Avoid possible memory corruption

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23666 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2009-11-19 17:12:58 +00:00
parent 84ca236c30
commit ad9f554eb2

View file

@ -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);