summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-07-26 21:51:03 +0000
committerjbj <devnull@localhost>1999-07-26 21:51:03 +0000
commitcdd837431a4606ab692d3a53c40b61013307cf76 (patch)
treea794f404c00d05733a4fc35a35426317f0e7b040
parent5ddfcc2f6ab43ca5bbaf4cfce2aeeef5c316616c (diff)
downloadrpm-cdd837431a4606ab692d3a53c40b61013307cf76.tar.gz
rpm-cdd837431a4606ab692d3a53c40b61013307cf76.tar.bz2
rpm-cdd837431a4606ab692d3a53c40b61013307cf76.zip
fix: segfault on --rebuild (#4185).
CVS patchset: 3203 CVS date: 1999/07/26 21:51:03
-rw-r--r--CHANGES1
-rw-r--r--build/parseSpec.c2
-rw-r--r--build/spec.c1
-rw-r--r--po/rpm.pot2
4 files changed, 4 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index c9b9d223b..f4bf11127 100644
--- 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).
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 8c5838672..6eb55b4bf 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -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';
}
diff --git a/build/spec.c b/build/spec.c
index fa77546ea..ada50c24a 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -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;
diff --git a/po/rpm.pot b/po/rpm.pot
index 13c87d931..967d2bd73 100644
--- a/po/rpm.pot
+++ b/po/rpm.pot
@@ -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"