[MPlayer-cvslog] r34674 - trunk/gui/cfg.c
ib
subversion at mplayerhq.hu
Thu Feb 9 16:01:32 CET 2012
Author: ib
Date: Thu Feb 9 16:01:32 2012
New Revision: 34674
Log:
Prevent out-of-bounds array access of fsHistory.
Modified:
trunk/gui/cfg.c
Modified: trunk/gui/cfg.c
==============================================================================
--- trunk/gui/cfg.c Thu Feb 9 15:53:24 2012 (r34673)
+++ trunk/gui/cfg.c Thu Feb 9 16:01:32 2012 (r34674)
@@ -27,6 +27,7 @@
#include "config.h"
#include "help_mp.h"
+#include "libavutil/common.h"
#include "libmpcodecs/vd.h"
#include "libmpdemux/demuxer.h"
#include "libvo/video_out.h"
@@ -330,9 +331,10 @@ void cfg_read(void)
file = fopen(fname, "rt");
if (file) {
- int i = 0;
+ unsigned int i = 0;
while (fgetstr(line, sizeof(line), file))
+ if (i < FF_ARRAY_ELEMS(fsHistory))
fsHistory[i++] = gstrdup(line);
fclose(file);
More information about the MPlayer-cvslog
mailing list