Commit 00555f4b authored by Jun Zhao's avatar Jun Zhao

lavc/avpacket: check NULL before using the pointer

Need to check NULL before using the pointer
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent 014b0e50
......@@ -522,11 +522,12 @@ fail:
int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict)
{
const uint8_t *end = data + size;
const uint8_t *end;
int ret = 0;
if (!dict || !data || !size)
return ret;
end = data + size;
if (size && end[-1])
return AVERROR_INVALIDDATA;
while (data < end) {
......
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