Add null pointer guard

svn path=/trunk/; revision=30340
This commit is contained in:
Kovarththanan Rajaratnam 2009-10-05 18:12:16 +00:00
parent 0cc4720cb8
commit f48e1b1574
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ static int fgetline(char **buf, int *size, FILE *fp)
int len;
int c;
if (fp == NULL)
if (fp == NULL || buf == NULL)
return -1;
if (*buf == NULL) {