Commit f077e1fb authored by Martin Ettl's avatar Martin Ettl Committed by Michael Niedermayer

ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.

Fixed Ticket1780
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d4e82a34
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment