From 241581a93ed0591bfae162089d9e61a606201fb4 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Wed, 12 Aug 2009 16:06:08 +0200 Subject: [PATCH] rpmbuild won't segfault when %including spec with zero size --- build/parseSpec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/parseSpec.c b/build/parseSpec.c index 168370c..8eca502 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'; -- 2.7.4