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 leaking \x1f at macro argument boundaries (#2284187)
Date: Mon, 23 Nov 2026 09:35:26 GMT [thread overview]
Message-ID: <179542652680.1.14363435342683553993.rpms-rpm-5fc63a04fe0b@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 5fc63a04fe0b747faa07e1a9448b58a63a52c9e7
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2024-06-05T14:49:22+03:00
Stats : +36/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/5fc63a04fe0b747faa07e1a9448b58a63a52c9e7?branch=pmatilai-v6
Log:
Fix leaking \x1f at macro argument boundaries (#2284187)
---
diff --git a/0001-Always-clear-the-RPMEXPAND_KEEP_QUOTED-flag-if-we-do.patch b/0001-Always-clear-the-RPMEXPAND_KEEP_QUOTED-flag-if-we-do.patch
new file mode 100644
index 0000000..554ea75
--- /dev/null
+++ b/0001-Always-clear-the-RPMEXPAND_KEEP_QUOTED-flag-if-we-do.patch
@@ -0,0 +1,31 @@
+From b871b6870659681448372270c061a99a8c73d9f9 Mon Sep 17 00:00:00 2001
+Message-ID: <b871b6870659681448372270c061a99a8c73d9f9.1717588019.git.pmatilai@redhat.com>
+From: Michael Schroeder <mls@suse.de>
+Date: Wed, 5 Jun 2024 11:35:33 +0200
+Subject: [PATCH] Always clear the RPMEXPAND_KEEP_QUOTED flag if we do not
+ return the resulting flags
+
+If the resulting flags cannot be returned, the caller has no way to
+strip the quote characters. So we must assume that we are not to
+return quotes in this case.
+
+Fixes issue #3145
+---
+ rpmio/macro.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/rpmio/macro.c b/rpmio/macro.c
+index fb6d8aede..5b89bbfc0 100644
+--- a/rpmio/macro.c
++++ b/rpmio/macro.c
+@@ -416,6 +416,7 @@ expandThis(rpmMacroBuf mb, const char * src, size_t slen, char **target, int *fl
+ umb = *mb;
+ umb.buf = "";
+ umb.error = 0;
++ umb.flags &= ~(RPMEXPAND_HAVE_QUOTED | RPMEXPAND_KEEP_QUOTED);
+ if (flagsp)
+ umb.flags = *flagsp;
+ /* In case of error, flag it in the "parent"... */
+--
+2.45.1
+
diff --git a/rpm.spec b/rpm.spec
index 5acad2b..f1d09fe 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -27,7 +27,7 @@
%global rpmver 4.19.91
#global snapver rc1
-%global baserelease 7
+%global baserelease 8
%global sover 10
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -159,6 +159,7 @@ rpm-4.19.91-weak-user-group.patch
0001-Minimally-bring-back-buildroot-cli-switch-for-cpack.patch
0002-Minimally-bring-back-_buildrootdir-for-backwards-com.patch
0003-Require-buildsubdir-to-be-defined-to-get-debuginfo-p.patch
+0001-Always-clear-the-RPMEXPAND_KEEP_QUOTED-flag-if-we-do.patch
# These are not yet upstream
rpm-4.7.1-geode-i686.patch
@@ -661,6 +662,9 @@ fi
%doc %{_defaultdocdir}/rpm/API/
%changelog
+* Wed Jun 05 2024 Panu Matilainen <pmatilai@redhat.com> - 4.19.91-8
+- Fix leaking \x1f at macro argument boundaries (#2284187)
+
* Tue Jun 04 2024 Panu Matilainen <pmatilai@redhat.com> - 4.19.91-7
- Resurrect rpmbuild --buildroot option for cpack (#2284124)
- Bring back %%{buildsubdir} requirement for debuginfo generation
reply other threads:[~2026-11-23 9:35 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=179542652680.1.14363435342683553993.rpms-rpm-5fc63a04fe0b@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