Skip to content

Commit

Permalink
[librtmpc] Check return value of sscanf()
Browse files Browse the repository at this point in the history
  • Loading branch information
szsam committed May 12, 2023
1 parent 5e1947f commit d891d13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gear-lib/librtmpc/parseurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ void RTMP_ParsePlaypath(AVal *in, AVal *out)
if (*p == '%')
{
unsigned int c;
sscanf(p+1, "%02x", &c);
if (sscanf(p+1, "%02x", &c) != 1) {
break;
}
*destptr++ = c;
pplen -= 3;
p += 3;
Expand Down

0 comments on commit d891d13

Please sign in to comment.