From f077e1fb4c912a66ab5d766fd256803821d92c67 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Tue, 2 Oct 2012 22:57:25 +0200 Subject: [PATCH] ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier. Fixed Ticket1780 Signed-off-by: Michael Niedermayer --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index 7fb61d04ea..cb7e3aeda3 100644 --- a/ffserver.c +++ b/ffserver.c @@ -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);