summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-11-19 17:12:58 +0000
committerNils Wallménius <nils@rockbox.org>2009-11-19 17:12:58 +0000
commitad9f554eb281e8e2a3c1fc96ed89ff50dc2c1b63 (patch)
tree11c052f89b49dcf01d6c4387f8cc008eeaed672a
parent84ca236c301e6003b1690218c39fd4c221aa3773 (diff)
downloadrockbox-ad9f554eb281e8e2a3c1fc96ed89ff50dc2c1b63.tar.gz
rockbox-ad9f554eb281e8e2a3c1fc96ed89ff50dc2c1b63.tar.bz2
rockbox-ad9f554eb281e8e2a3c1fc96ed89ff50dc2c1b63.zip
Avoid possible memory corruption
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23666 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libm4a/demux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs/libm4a/demux.c b/apps/codecs/libm4a/demux.c
index 2cb236ae23..61ff16c0d9 100644
--- a/apps/codecs/libm4a/demux.c
+++ b/apps/codecs/libm4a/demux.c
@@ -231,8 +231,9 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len)
qtmovie->res->codecdata_len = entry_remaining + 12 + 8;
if (qtmovie->res->codecdata_len > MAX_CODECDATA_SIZE)
{
- DEBUGF("codecdata too large (%d) in stsd\n",
- (int)qtmovie->res->codecdata_len);
+ DEBUGF("codecdata too large (%d) in stsd\n",
+ (int)qtmovie->res->codecdata_len);
+ return false;
}
memset(qtmovie->res->codecdata, 0, qtmovie->res->codecdata_len);