Attempt to silence bogus compiler warning: "Potential null pointer dereference throug...
authorYang Tse <yangsita@gmail.com>
Wed, 16 Sep 2009 16:49:02 +0000 (16:49 +0000)
committerYang Tse <yangsita@gmail.com>
Wed, 16 Sep 2009 16:49:02 +0000 (16:49 +0000)
src/writeout.c

index 14ba41b..9aab771 100644 (file)
@@ -108,7 +108,7 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
   long longinfo;
   double doubleinfo;
 
-  while(*ptr) {
+  while(ptr && *ptr) {
     if('%' == *ptr) {
       if('%' == ptr[1]) {
         /* an escaped %-letter */