- fix: % at end-of-line overflow (#161091).
authorjbj <devnull@localhost>
Wed, 13 Jul 2005 09:52:45 +0000 (09:52 +0000)
committerjbj <devnull@localhost>
Wed, 13 Jul 2005 09:52:45 +0000 (09:52 +0000)
CVS patchset: 7874
CVS date: 2005/07/13 09:52:45

CHANGES
rpmio/macro.c

diff --git a/CHANGES b/CHANGES
index 01ac633..800a2e6 100644 (file)
--- 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.
index 463ed9a..2cff4b1 100644 (file)
@@ -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);