diff --git a/xpcom/glue/nsCRTGlue.cpp b/xpcom/glue/nsCRTGlue.cpp index 134dee0b66a7..5baf337188a0 100644 --- a/xpcom/glue/nsCRTGlue.cpp +++ b/xpcom/glue/nsCRTGlue.cpp @@ -91,7 +91,7 @@ NS_strtok(const char *delims, char **str) } while (*i); *str = NULL; - return NULL; + return ret; } PRUint32 diff --git a/xpcom/glue/nsINIParser.cpp b/xpcom/glue/nsINIParser.cpp index f86bcea196e7..b0f7be7e4df7 100644 --- a/xpcom/glue/nsINIParser.cpp +++ b/xpcom/glue/nsINIParser.cpp @@ -197,7 +197,7 @@ nsINIParser::InitFromFILE(FILE *fd) char *key = token; char *e = NS_strtok(kEquals, &token); - if (!e) + if (!e || !token) continue; INIValue *v;