From f398c68b695ee3dad829d95a724573ca42926205 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 3 Jun 2007 03:01:31 +0100 Subject: Add a comment & changelog entry for the mmap bug fix. --- ChangeLog | 1 + src/input/input_file.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a827947c7..ff67ebc56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ xine-lib (1.1.7) (unreleased) also avoids an improper saturation. * Prioritize the musepack demuxer over mpgaudio, as sometimes the latter can misfire and report a good file as unplayable. + * Fix an mmap problem with huge files on 32-bit systems. xine-lib (1.1.6) * Split the DirectFB plugin into X11 and non-X versions. diff --git a/src/input/input_file.c b/src/input/input_file.c index d57eaacb9..c755a84a8 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -426,7 +426,7 @@ static int file_plugin_open (input_plugin_t *this_gen ) { } #ifdef HAVE_MMAP - tmp_size = sbuf.st_size; + tmp_size = sbuf.st_size; /* may cause truncation - if it does, DON'T mmap! */ if ((tmp_size == sbuf.st_size) && ( (this->mmap_base = mmap(NULL, tmp_size, PROT_READ, MAP_SHARED, this->fh, 0)) != (void*)-1 )) { this->mmap_on = 1; -- cgit v1.2.3