Skip to content

Commit

Permalink
fixed missing check for null after strdup in evutil_inet_pton_scope (l…
Browse files Browse the repository at this point in the history
  • Loading branch information
mkm85 authored Nov 4, 2022
1 parent 3ec3b46 commit ff99f67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -2248,7 +2248,9 @@ evutil_inet_pton_scope(int af, const char *src, void *dst, unsigned *indexp)
return 0;
}
*indexp = if_index;
tmp_src = mm_strdup(src);
if (!(tmp_src = mm_strdup(src)) {
return -1;
}
cp = strchr(tmp_src, '%');
*cp = '\0';
r = evutil_inet_pton(af, tmp_src, dst);
Expand Down

0 comments on commit ff99f67

Please sign in to comment.