Skip to content

Commit

Permalink
Return NULL when NULL is passed to disambiguate_pp
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink committed Jun 2, 2012
1 parent 22ee05c commit 6d77bd4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/detector.c
Expand Up @@ -780,6 +780,9 @@ size_t mystrnlen(const char *begin, size_t maxlen) {
const char *disambiguate_pp(SourceFile *sourcefile) {
char *p = ohcount_sourcefile_get_contents(sourcefile);

if (!p)
return NULL;

/* prepare regular expressions */
const char *error;
int erroffset;
Expand Down

0 comments on commit 6d77bd4

Please sign in to comment.