Commit 4b1f45e4 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

make len==0 return OPUS_INVALID_PACKET rather than OPUS_BAD_ARG for opus_packet_parse_impl()

len<0 still returns OPUS_BAD_ARG
parent 5e50f1f9
......@@ -201,8 +201,10 @@ int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
opus_int32 pad = 0;
const unsigned char *data0 = data;
if (size==NULL || len<1)
if (size==NULL || len<0)
return OPUS_BAD_ARG;
if (len==0)
return OPUS_INVALID_PACKET;
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