[vlc-commits] gme: fixed out-of-memory/out-of-range tests
Piotr Fusik
git at videolan.org
Thu Apr 5 22:49:30 CEST 2012
vlc/vlc-2.0 | branch: master | Piotr Fusik <piotr at fusik.info> | Mon Mar 26 23:35:38 2012 +0200| [7563c8713a7fcb45c1d73321f1af2d53060f51b9] | committer: Jean-Baptiste Kempf
gme: fixed out-of-memory/out-of-range tests
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 44b34340a6d2d3b94f4260ad80e080b94fd18b3b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=7563c8713a7fcb45c1d73321f1af2d53060f51b9
---
modules/demux/gme.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/gme.c b/modules/demux/gme.c
index 464ba9e..a389f9e 100644
--- a/modules/demux/gme.c
+++ b/modules/demux/gme.c
@@ -262,7 +262,7 @@ static int Control (demux_t *demux, int query, va_list args)
break;
int seek = (sys->titlev[sys->track_id]->i_length / 1000) * pos;
- if (seek > INT_MAX || gme_seek (sys->emu, seek))
+ if (gme_seek (sys->emu, seek))
break;
return VLC_SUCCESS;
}
@@ -302,7 +302,7 @@ static int Control (demux_t *demux, int query, va_list args)
unsigned n = sys->titlec;
*titlev = malloc (sizeof (**titlev) * n);
- if (unlikely(titlev == NULL))
+ if (unlikely(*titlev == NULL))
n = 0;
*titlec = n;
for (unsigned i = 0; i < n; i++)
More information about the vlc-commits
mailing list