From: Peter Howkins Date: Tue, 3 Jul 2018 17:49:43 +0000 (+0100) Subject: dtstyle: Coverity 87337 X-Git-Tag: 2.3.0a~228 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a6cdaa885044b935add17175b80ec2806e682936;p=oweals%2Fcde.git dtstyle: Coverity 87337 --- diff --git a/cde/programs/dtstyle/I18nEnv.c b/cde/programs/dtstyle/I18nEnv.c index 674624ee..b8565a79 100644 --- a/cde/programs/dtstyle/I18nEnv.c +++ b/cde/programs/dtstyle/I18nEnv.c @@ -465,7 +465,7 @@ ReadPipe ( nbytes = read (*fd, buf, 512); - if (nbytes) { + if (nbytes > 0) { savebuf = XtRealloc(savebuf, savebuf_bytes + nbytes); memcpy(savebuf+savebuf_bytes, buf, nbytes); savebuf_bytes += nbytes ;