[FFmpeg-cvslog] ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.

Martin Ettl git at videolan.org
Mon Dec 3 20:33:41 CET 2012


ffmpeg | branch: release/1.0 | Martin Ettl <ettl.martin78 at googlemail.com> | Tue Oct  2 22:57:25 2012 +0200| [ce433996d7f0dfa8d20aea01bfdb1930b7a1426c] | committer: Michael Niedermayer

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

Fixed Ticket1780

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit f077e1fb4c912a66ab5d766fd256803821d92c67)

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce433996d7f0dfa8d20aea01bfdb1930b7a1426c
---

 ffserver.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffserver.c b/ffserver.c
index 1eae3ad..4044d0f 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);



More information about the ffmpeg-cvslog mailing list