public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix excessive reference counting on faked string .decode()
Date: Mon, 23 Nov 2026 09:32:19 GMT [thread overview]
Message-ID: <179542633972.1.3156381471130495481.rpms-rpm-c7bd807f7c9d@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : c7bd807f7c9d21e9edcf015236411fc214fd263e
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2019-04-11T10:38:45+03:00
Stats : +5/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/c7bd807f7c9d21e9edcf015236411fc214fd263e?branch=pmatilai-v6
Log:
Fix excessive reference counting on faked string .decode()
---
diff --git a/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch b/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch
index e655848..6df9fab 100644
--- a/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch
+++ b/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch
@@ -52,7 +52,7 @@ diff --git a/python/rpmsystem-py.h b/python/rpmsystem-py.h
index 25938464a..803da0fc1 100644
--- a/python/rpmsystem-py.h
+++ b/python/rpmsystem-py.h
-@@ -19,12 +19,30 @@
+@@ -19,12 +19,29 @@
#define PyInt_AsSsize_t PyLong_AsSsize_t
#endif
@@ -76,7 +76,6 @@ index 25938464a..803da0fc1 100644
+ Py_DECREF(n);
+ }
+ if (fakedecode && o) {
-+ Py_INCREF(fakedecode);
+ /* monkey-patch it into the string object as "decode" */
+ PyDict_SetItemString(Py_TYPE(o)->tp_dict, "decode", fakedecode);
+ }
diff --git a/rpm.spec b/rpm.spec
index 11c05da..5abd401 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -23,7 +23,7 @@
%global rpmver 4.14.2.1
#global snapver rc2
-%global rel 6
+%global rel 7
%global srcver %{version}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -576,6 +576,9 @@ make check || (cat tests/rpmtests.log; exit 1)
%doc doc/librpm/html/*
%changelog
+* Thu Apr 11 2019 Panu Matilainen <pmatilai@redhat.com> - 4.14.2.1-7
+- Fix excessive reference counting on faked string .decode()
+
* Wed Apr 10 2019 Panu Matilainen <pmatilai@redhat.com> - 4.14.2.1-6
- Unbreak Python 3 API by returning string data as surrogate-escaped utf-8
string objects instead of bytes (#1693751)
reply other threads:[~2026-11-23 9:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542633972.1.3156381471130495481.rpms-rpm-c7bd807f7c9d@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox