From: jbj Date: Wed, 13 Jul 2005 09:52:45 +0000 (+0000) Subject: - fix: % at end-of-line overflow (#161091). X-Git-Tag: rpm-4.4.2-release~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6aed9338a64e5b7904855ac88c8a43fda48b278f;p=platform%2Fupstream%2Frpm.git - fix: % at end-of-line overflow (#161091). CVS patchset: 7874 CVS date: 2005/07/13 09:52:45 --- diff --git a/CHANGES b/CHANGES index 01ac633..800a2e6 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,7 @@ - added CVSId: tag and SVNId: alias (#162807). - added brp-java-gcjcompile build helper. - fix: java compiled with -O0 confuses debugedit (#161722). + - fix: % at end-of-line overflow (#161091). 4.4 -> 4.4.1: - force *.py->*.pyo byte code compilation with brp-python-bytecompile. diff --git a/rpmio/macro.c b/rpmio/macro.c index 463ed9a..2cff4b1 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1234,9 +1234,11 @@ expandMacro(MacroBuf mb) /* Copy text until next macro */ switch(c) { case '%': - if (*s != '%') + if (*s) { /* Ensure not end-of-string. */ + if (*s != '%') /*@switchbreak@*/ break; - s++; /* skip first % in %% */ + s++; /* skip first % in %% */ + } /*@fallthrough@*/ default: SAVECHAR(mb, c);