diff options
author | jbj <devnull@localhost> | 1999-07-26 21:51:03 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-07-26 21:51:03 +0000 |
commit | cdd837431a4606ab692d3a53c40b61013307cf76 (patch) | |
tree | a794f404c00d05733a4fc35a35426317f0e7b040 /build | |
parent | 5ddfcc2f6ab43ca5bbaf4cfce2aeeef5c316616c (diff) | |
download | rpm-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
Diffstat (limited to 'build')
-rw-r--r-- | build/parseSpec.c | 2 | ||||
-rw-r--r-- | build/spec.c | 1 |
2 files changed, 2 insertions, 1 deletions
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; |