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

Fix METADATA_BLOCK_PICTURE check for all-0 params.

width=height=depth=colors=0 should be allowed, but wasn't thanks to
 some missing parentheses.
Thanks to Lithopsian for the report.
parent ee911775
......@@ -564,7 +564,7 @@ static int opus_picture_tag_parse_impl(OpusPictureTag *_pic,const char *_tag,
/*If one of these is set, they all must be, but colors==0 is a valid value.*/
if(width==0||height==0||depth==0&&colors_set)return OP_ENOTFORMAT;
if((width==0||height==0||depth==0)&&colors_set)return OP_ENOTFORMAT;
if(data_length>_buf_sz-i)return OP_ENOTFORMAT;
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