From 469c1cfe44b5d1bab63cb01867fe841c79fab820 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Jul 15 2008 17:18:17 +0000 Subject: - 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 +- 4.5.90-0.git8426.8 +- fix regression in macro argument handling (#455333) + * Mon Jul 14 2008 Panu Matilainen - 4.5.90-0.git8426.7 - fix mono dependency extraction (adjust for libmagic string change)