From ae9b5a75d9560ec5ce88f93e89efccdf64594100 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 10 Oct 2009 12:12:07 +0100 Subject: MOD reported zero-length workaround (avoids divide-by-0). --- src/demuxers/demux_mod.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c index 34b8ebabe..de3e29ca8 100644 --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -178,6 +178,8 @@ static int open_mod_file(demux_mod_t *this) { this->copyright = strdup(""); this->mod_length = ModPlug_GetLength(this->mpfile); + if (this->mod_length < 1) + this->mod_length = 1; /* avoids -ve & div-by-0 */ return 1; } -- cgit v1.2.3