Commit 5e50f1f9 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Check for len<1 in opus_packet_parse_impl()

Rather than read invalid memory
parent 096f5d37
......@@ -201,7 +201,7 @@ int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
opus_int32 pad = 0;
const unsigned char *data0 = data;
if (size==NULL)
if (size==NULL || len<1)
return OPUS_BAD_ARG;
framesize = opus_packet_get_samples_per_frame(data, 48000);
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