Commit 91548c9a authored by conrad's avatar conrad
Browse files

flac_decode: fail if Ogg packet length is too short

when parsing header
For Mozilla bug 480014

git-svn-id: http://svn.annodex.net/libfishsound/trunk@3888 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 9bee4284
......@@ -237,6 +237,8 @@ static void*
fs_flac_decode_header (FishSound * fsound, unsigned char *buf, long bytes)
{
FishSoundFlacInfo *fi = fsound->codec_data;
if (bytes < 9) return NULL;
if (buf[0] != 0x7f) return NULL;
if (strncmp((char *)buf+1, "FLAC", 4) != 0) return NULL;
fi->version.major = buf[5];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment