Commit bd607f5c authored by Timothy B. Terriberry's avatar Timothy B. Terriberry
Browse files

Add missing NULL check to opus_tags_parse().

According to the API, you can pass in a NULL OpusTags object to
 simply check if the comment packet is valid, without storing the
 parsed results.
However, the additions to store binary metadata in commit
 0221ca95 did not check for this.

Fixes Coverity CID 149873.
parent 66a8c158
......@@ -205,11 +205,13 @@ static int opus_tags_parse_impl(OpusTags *_tags,
if(len>(opus_uint32)INT_MAX)return OP_EFAULT;
_tags->user_comments[ncomments]=(char *)_ogg_malloc(len);
if(OP_UNLIKELY(_tags->user_comments[ncomments]==NULL))return OP_EFAULT;
return 0;
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