Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix buffer overrun in gf_bin128_parse
closes #1204
closes #1205
  • Loading branch information
aureliendavid committed Apr 11, 2019
1 parent f461620 commit f3698bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/os_divers.c
Expand Up @@ -1988,8 +1988,14 @@ GF_Err gf_bin128_parse(const char *string, bin128 value)
break;
sprintf(szV, "%c%c", string[j], string[j+1]);
sscanf(szV, "%x", &v);
if (i > 15) {
// force error check below
i++;
break;
}
value[i] = v;
i++;

}
}
if (i != 16) {
Expand Down

0 comments on commit f3698bb

Please sign in to comment.