[vlc-commits] gme: fixed out-of-memory/out-of-range tests
Piotr Fusik
git at videolan.org
Wed Apr 4 20:27:23 CEST 2012
vlc | branch: master | Piotr Fusik <piotr at fusik.info> | Mon Mar 26 23:35:38 2012 +0200| [44b34340a6d2d3b94f4260ad80e080b94fd18b3b] | committer: Rémi Denis-Courmont
gme: fixed out-of-memory/out-of-range tests
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=44b34340a6d2d3b94f4260ad80e080b94fd18b3b
---
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