Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pbiering authored and mcdamo committed Feb 23, 2023
1 parent e1b9e72 commit 6e35c11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common-src/amutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,12 @@ char *hexdecode_string(const char *str, GError **err)
new_len = orig_len = strlen(str);
for (i = 0; i < orig_len; i++) {
if (str[i] == '%') {
if (new_len < 2) {
g_set_error(err, am_util_error_quark(), AM_UTIL_ERROR_HEXDECODEINVAL,
"Invalid hexcode string: %s", str);
s = g_string_sized_new(0);
goto cleanup;
}
new_len -= 2;
}
}
Expand Down

0 comments on commit 6e35c11

Please sign in to comment.