Skip to content

Commit

Permalink
ffserver: fix potential buffer overflow, based on wrong fscanf format…
Browse files Browse the repository at this point in the history
… indentifier.

Fixed Ticket1780

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
orbitcowboy authored and michaelni committed Oct 2, 2012
1 parent d4e82a3 commit f077e1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ffserver.c
Expand Up @@ -2029,7 +2029,7 @@ static void compute_status(HTTPContext *c)
char cpuperc[10];
char cpuused[64];

if (fscanf(pid_stat, "%10s %64s", cpuperc,
if (fscanf(pid_stat, "%9s %63s", cpuperc,
cpuused) == 2) {
avio_printf(pb, "Currently using %s%% of the cpu. Total time used %s.\n",
cpuperc, cpuused);
Expand Down

0 comments on commit f077e1f

Please sign in to comment.