Skip to content

Commit f077e1f

Browse files
orbitcowboymichaelni
authored andcommitted
ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.
Fixed Ticket1780 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
1 parent d4e82a3 commit f077e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ffserver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,7 @@ static void compute_status(HTTPContext *c)
20292029
char cpuperc[10];
20302030
char cpuused[64];
20312031

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

0 commit comments

Comments
 (0)