fix: segfault on --rebuild (#4185).
authorjbj <devnull@localhost>
Mon, 26 Jul 1999 21:51:03 +0000 (21:51 +0000)
committerjbj <devnull@localhost>
Mon, 26 Jul 1999 21:51:03 +0000 (21:51 +0000)
CVS patchset: 3203
CVS date: 1999/07/26 21:51:03

CHANGES
build/parseSpec.c
build/spec.c
po/rpm.pot

diff --git a/CHANGES b/CHANGES
index c9b9d22..f4bf111 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -17,6 +17,7 @@
        - the death of RPMSENSE_SERIAL, use [epoch:]version[-release] instead.
        - add _mandir/_infodir macro expansions to docdirs (Tomasz Kloczko).
        - add post install configurable dependency checking.
+       - fix: segfault on --rebuild (#4185).
 
 3.0.1 -> 3.0.2
        - eliminate armv4 entries from rpmrc (Andrew E. Mileski).
index 8c58386..6eb55b4 100644 (file)
@@ -106,7 +106,7 @@ static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
     char ch;
 
     /* Restore 1st char in (possible) next line */
-    if (spec->nextpeekc) {
+    if (spec->nextline != NULL && spec->nextpeekc != '\0') {
        *spec->nextline = spec->nextpeekc;
        spec->nextpeekc = '\0';
     }
index fa77546..ada50c2 100644 (file)
@@ -407,6 +407,7 @@ Spec newSpec(void)
     spec->lbuf[0] = '\0';
     spec->line = spec->lbuf;
     spec->nextline = NULL;
+    spec->nextpeekc = '\0';
     spec->lineNum = 0;
     spec->readStack = malloc(sizeof(struct ReadLevelEntry));
     spec->readStack->next = NULL;
index 13c87d9..967d2bd 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-07-23 15:16-0400\n"
+"POT-Creation-Date: 1999-07-26 17:44-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"