aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Ettl <ettl.martin78@googlemail.com>2012-10-02 22:57:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-12-03 19:36:15 +0100
commitce433996d7f0dfa8d20aea01bfdb1930b7a1426c (patch)
tree90b588bf0005c276dd8b009c2a5bc784ff7e559e
parente21a53b6ebb6428b257f9662cb5c833f3e066935 (diff)
downloadffmpeg-ce433996d7f0dfa8d20aea01bfdb1930b7a1426c.tar.gz
ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.
Fixed Ticket1780 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit f077e1fb4c912a66ab5d766fd256803821d92c67) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffserver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c
index 1eae3adff3..4044d0fa57 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2034,7 +2034,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);