Skip to content

Commit

Permalink
Skip entry if pointer is invalid (allocation of memory failed). Fixes p…
Browse files Browse the repository at this point in the history
  • Loading branch information
DL6ER committed Jun 19, 2017
1 parent e68105e commit 69bbbf5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,14 @@ int detectStatus(const char *domain)
{
// String duplication / memory allocation failed
logg("Notice: Memory allocation for part in detectStatus failed, domain: \"%s\"", domain);
continue;
}
char * partbuffer = calloc(strlen(part)+1, sizeof(char));
if(partbuffer == NULL)
{
// Memory allocation failed
logg("Notice: Memory allocation for partbuffer in detectStatus failed, domain: \"%s\"", domain);
continue;
}

// Strip subdomains one after another and
Expand Down

0 comments on commit 69bbbf5

Please sign in to comment.