ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.
authorMartin Ettl <ettl.martin78@googlemail.com>
Tue, 2 Oct 2012 20:57:25 +0000 (22:57 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Oct 2012 20:59:03 +0000 (22:59 +0200)
Fixed Ticket1780

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffserver.c

index 7fb61d0..cb7e3ae 100644 (file)
@@ -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);