summaryrefslogtreecommitdiffstats
path: root/libavcodec/diracdec.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-04 18:59:31 +0100
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-04 20:34:38 +0100
commit8a4ea9644833d43fdfe8579c0cb569f8a0930206 (patch)
tree8b0f41594811e8fbfbd0087fd9be0f8285b8ab2f /libavcodec/diracdec.c
parent92280f86b4065be34f52531c73068bbe7f33febd (diff)
downloadffmpeg-streaming-8a4ea9644833d43fdfe8579c0cb569f8a0930206.zip
ffmpeg-streaming-8a4ea9644833d43fdfe8579c0cb569f8a0930206.tar.gz
diracdec: use correct buffer for slice_params_buf realloc
This fixes a double-free detected by AddressSanitizer. The problem was introduced in commit dcad4677d637cd2f701917e38361fa96b8c9a418. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r--libavcodec/diracdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index b183fad..5c669ff 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -907,7 +907,7 @@ static int decode_lowdelay(DiracContext *s)
int slice_num = 0;
if (s->slice_params_num_buf != (s->num_x * s->num_y)) {
- s->slice_params_buf = av_realloc_f(s->thread_buf, s->num_x * s->num_y, sizeof(DiracSlice));
+ s->slice_params_buf = av_realloc_f(s->slice_params_buf, s->num_x * s->num_y, sizeof(DiracSlice));
if (!s->slice_params_buf) {
av_log(s->avctx, AV_LOG_ERROR, "slice params buffer allocation failure\n");
return AVERROR(ENOMEM);
OpenPOWER on IntegriCloud