public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Fix leaking \x1f at macro argument boundaries (#2284187)
@ 2026-11-23 9:35 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:35 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:35 [rpms/rpm] pmatilai-v6: Fix leaking \x1f at macro argument boundaries (#2284187) Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox