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

Fix NULL check in opus_tags_add_comment().

In 0221ca95 the allocation result went from being stored
 directly in "_tags->user_comments[ncomments]" to being stored in
 the temporary "comment".
However, the NULL check for allocation failure was not updated to
This meant this function would almost always fail, unless you had
 added binary metadata first.

Fixes Coverity CID 149874.
parent 78cd9bcf
......@@ -306,7 +306,7 @@ int opus_tags_add_comment(OpusTags *_tags,const char *_comment){
if(OP_UNLIKELY(ret<0))return ret;
if(OP_UNLIKELY(_tags->user_comments[ncomments]==NULL))return OP_EFAULT;
if(OP_UNLIKELY(comment==NULL))return OP_EFAULT;
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