diff options
Diffstat (limited to 'src/demuxers/demux_mod.c')
-rw-r--r-- | src/demuxers/demux_mod.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c index c424ffc81..ab5157531 100644 --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -70,7 +70,7 @@ typedef struct { char *title; char *artist; char *copyright; - off_t filesize; + size_t filesize; char *buffer; @@ -131,7 +131,11 @@ static int open_mod_file(demux_mod_t *this) { /* Get size and create buffer */ this->filesize = this->input->get_length(this->input); this->buffer = (char *)malloc(this->filesize); - + if(!this->buffer) { + xine_log(this->stream->xine, XINE_LOG_PLUGIN, "modplug - allocation failure\n"); + return 0; + } + /* Seek to beginning */ this->input->seek(this->input, 0, SEEK_SET); |