summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text-utils/display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/text-utils/display.c b/text-utils/display.c
index 25d7f043..3d4bdcd9 100644
--- a/text-utils/display.c
+++ b/text-utils/display.c
@@ -255,7 +255,8 @@ get(void)
(void)printf("*\n");
return(NULL);
}
- memset((char *)curp + nread, 0, need);
+ if (need > 0)
+ memset((char *)curp + nread, 0, need);
eaddress = address + nread;
return(curp);
}