Commit 43de8b32 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Luca Barbato

lzf: update pointer p after realloc

This fixes heap-use-after-free detected by AddressSanitizer.
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent ab839054
......@@ -53,6 +53,7 @@ int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size)
ret = av_reallocp(buf, *size);
if (ret < 0)
return ret;
p = *buf + len;
}
bytestream2_get_buffer(gb, p, s);
......@@ -75,6 +76,7 @@ int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size)
ret = av_reallocp(buf, *size);
if (ret < 0)
return ret;
p = *buf + len;
}
av_memcpy_backptr(p, off, l);
......
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