make somewhat safer
authorceriel <none@none>
Thu, 1 Sep 1988 10:07:02 +0000 (10:07 +0000)
committerceriel <none@none>
Thu, 1 Sep 1988 10:07:02 +0000 (10:07 +0000)
lang/cem/libcc/stdio/getgrent.c
lang/cem/libcc/stdio/getpwent.c

index cea6baa..de75c9d 100644 (file)
@@ -64,7 +64,7 @@ static getline ()
 
 static skip_period () 
 {
-        while (*_buf != ':')
+        while (*_buf && *_buf != ':')
                _buf++;
         *_buf++ = '\0';
 }
index 50ecbbe..1ab9041 100644 (file)
@@ -65,7 +65,7 @@ static getline ()
 
 static skip_period () 
 {
-       while (*_buf != ':')
+       while (*_buf && *_buf != ':')
                _buf++;
 
        *_buf++ = '\0';