From 6aed9338a64e5b7904855ac88c8a43fda48b278f Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 13 Jul 2005 09:52:45 +0000 Subject: [PATCH] - fix: % at end-of-line overflow (#161091). CVS patchset: 7874 CVS date: 2005/07/13 09:52:45 --- CHANGES | 1 + rpmio/macro.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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); -- 2.7.4