---
libavcodec/apedec.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 3169eaa..2dae203 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -824,7 +824,10 @@ static int ape_decode_frame(AVCodecContext *avctx,
}
if(!s->samples){
- s->data = av_realloc(s->data, (buf_size + 3) & ~3);
+ void *tmp_data = av_realloc(s->data, (buf_size + 3) & ~3);
+ if (!tmp_data)
+ return AVERROR(ENOMEM);
+ s->data = tmp_data;
s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >>
2);
s->ptr = s->last_ptr = s->data;
s->data_end = s->data + buf_size;
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel