Commit bd372c9e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

gme: reject streams with unknown size

They never worked in this context (they would be treated as 0 bytes).
parent 8ff4b514
...@@ -70,8 +70,10 @@ static gme_err_t ReaderBlock (void *, void *, int); ...@@ -70,8 +70,10 @@ static gme_err_t ReaderBlock (void *, void *, int);
static int Open (vlc_object_t *obj) static int Open (vlc_object_t *obj)
{ {
demux_t *demux = (demux_t *)obj; demux_t *demux = (demux_t *)obj;
uint64_t size;
int64_t size = stream_Size (demux->s); if (vlc_stream_GetSize(demux->s, &size))
return VLC_EGENERIC;
if (size > LONG_MAX /* too big for GME */) if (size > LONG_MAX /* too big for GME */)
return VLC_EGENERIC; return VLC_EGENERIC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment