Skip to content

Commit

Permalink
Test integrity of passed pointer to strsanitize() (redundant check)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweets committed Oct 9, 2021
1 parent 7036070 commit a36f251
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,14 @@ static void strreplsub(char **_haystack, const char *needle, const char *replace
}

static void strsanitize(char **_string) {
if (!_string)
return;

char *string = *_string;

if (!string || strlen(string) == 0)
return;

int index, quotes, output_index = 0;
char cell;

Expand Down

0 comments on commit a36f251

Please sign in to comment.