summaryrefslogtreecommitdiff
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-17 23:12:58 +0100
commit08b1fd6afb3d96d21822ce16bb7112af5481e4b8 (patch)
tree1465610e06936912018bac1c8f3c986207b29f9f
parent35cb0c47bc8901a194937f3b387926af2ebdd579 (diff)
downloadffmpeg-08b1fd6afb3d96d21822ce16bb7112af5481e4b8.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> (cherry picked from commit 8a4ea9644833d43fdfe8579c0cb569f8a0930206) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r--libavcodec/diracdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index b183fad584..5c669ffdee 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);