summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2009-08-12 16:06:08 +0200
committerJindrich Novy <jnovy@redhat.com>2009-08-12 16:06:08 +0200
commit241581a93ed0591bfae162089d9e61a606201fb4 (patch)
tree5625f2c987aeaa54c9c9192a8ce8da40bca8ed36
parent3b7d3b0c19e2ea4f402bba8f014920eabe0415e0 (diff)
downloadrpm-241581a93ed0591bfae162089d9e61a606201fb4.tar.gz
rpm-241581a93ed0591bfae162089d9e61a606201fb4.tar.bz2
rpm-241581a93ed0591bfae162089d9e61a606201fb4.zip
rpmbuild won't segfault when %including spec with zero size
-rw-r--r--build/parseSpec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 168370c14..8eca50254 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -129,7 +129,7 @@ static int copyNextLineFromOFI(rpmSpec spec, OFI_t *ofi)
to = spec->lbufPtr ? spec->lbufPtr : spec->lbuf;
from = ofi->readPtr;
ch = ' ';
- while (*from && ch != '\n')
+ while (from && *from && ch != '\n')
ch = *to++ = *from++;
spec->lbufPtr = to;
*to++ = '\0';