public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - macro arg handling tweaks to fix #455307
Date: Mon, 23 Nov 2026 09:25:01 GMT	[thread overview]
Message-ID: <179542590142.1.12490636507553609922.rpms-rpm-469c1cfe44b5@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 469c1cfe44b5d1bab63cb01867fe841c79fab820
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date   : 2008-07-15T17:18:17+00:00
Stats  : +24/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/469c1cfe44b5d1bab63cb01867fe841c79fab820?branch=pmatilai-v6

Log:
- macro arg handling tweaks to fix #455307

---
diff --git a/rpm-4.5.90-macroarg.patch b/rpm-4.5.90-macroarg.patch
new file mode 100644
index 0000000..468905d
--- /dev/null
+++ b/rpm-4.5.90-macroarg.patch
@@ -0,0 +1,17 @@
+diff --git a/rpmio/macro.c b/rpmio/macro.c
+index 14d4565..cc0638a 100644
+--- a/rpmio/macro.c
++++ b/rpmio/macro.c
+@@ -797,8 +797,10 @@ grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se,
+     {	ARGV_t av = NULL;
+ 	char *s = xcalloc((lastc-se)+1, sizeof(*s));
+ 
+-	memmove(s, se, (lastc-se));
+-	ret = se + strlen(s) + 1;
++	/* XXX expandMacro() expects next \0 which can be beyond lastc */
++	ret = strchr(se, '\0');
++	memcpy(s, se, (lastc-se));
++
+ 	argvSplit(&av, s, " ");
+ 	argvAppend(&argv, av);
+ 

diff --git a/rpm.spec b/rpm.spec
index 0f295ef..acc5f55 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -18,7 +18,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 0.%{snapver}.7
+Release: 0.%{snapver}.8
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -34,6 +34,7 @@ Patch100: rpm-4.6.x-no-pkgconfig-reqs.patch
 # These are already upstream, drop on next snapshot update:
 Patch200: rpm-4.5.90-digestlen.patch
 Patch201: rpm-4.5.90-mono-magic.patch
+Patch202: rpm-4.5.90-macroarg.patch
 
 # Partially GPL/LGPL dual-licensed and some bits with BSD
 # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD 
@@ -163,6 +164,7 @@ that will manipulate RPM packages and databases.
 
 %patch200 -p1 -b .diglen
 %patch201 -p1 -b .mono-magic
+%patch202 -p1 -b .macroarg
 
 %if %{with int_bdb}
 ln -s db-%{bdbver} db
@@ -338,6 +340,10 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Tue Jul 15 2008 Panu Matilainen <pmatilai@redhat.com>
+- 4.5.90-0.git8426.8
+- fix regression in macro argument handling (#455333)
+
 * Mon Jul 14 2008 Panu Matilainen <pmatilai@redhat.com>
 - 4.5.90-0.git8426.7
 - fix mono dependency extraction (adjust for libmagic string change)

                 reply	other threads:[~2026-11-23  9:25 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=179542590142.1.12490636507553609922.rpms-rpm-469c1cfe44b5@fedoraproject.org \
    --to=pmatilai@fedoraproject.org \
    --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