dtstyle: Coverity 87337
authorPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:49:43 +0000 (18:49 +0100)
committerPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:49:43 +0000 (18:49 +0100)
cde/programs/dtstyle/I18nEnv.c

index 674624eed87ea10ff606fc02bbe44b85ab493468..b8565a79d8bdca4331e5c4744af2c01a5f9ec2f3 100644 (file)
@@ -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 ;