diff options
author | davidxu <davidxu@FreeBSD.org> | 2002-12-24 07:40:10 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2002-12-24 07:40:10 +0000 |
commit | ccb03bf540762bed7e69099aadc68ae52d07c155 (patch) | |
tree | 40cf3b1839056abbadaad251b7d8e3120ded151d /usr.bin/gencat | |
parent | d3c2f878f156c42c0119a330362b1c4cd0945cdb (diff) | |
download | FreeBSD-src-ccb03bf540762bed7e69099aadc68ae52d07c155.zip FreeBSD-src-ccb03bf540762bed7e69099aadc68ae52d07c155.tar.gz |
Check NULL pointer to avoid SIGSEGV
Diffstat (limited to 'usr.bin/gencat')
-rw-r--r-- | usr.bin/gencat/genlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/gencat/genlib.c b/usr.bin/gencat/genlib.c index 8eaf39c..d0fcefa 100644 --- a/usr.bin/gencat/genlib.c +++ b/usr.bin/gencat/genlib.c @@ -450,7 +450,8 @@ MCReadCat(int fd) static void printS(int fd, const char *str) { - write(fd, str, strlen(str)); + if (str) + write(fd, str, strlen(str)); } static void |