diff options
author | Roberto Togni <r_togni@tiscali.it> | 2003-11-01 01:28:19 +0300 |
---|---|---|
committer | Roberto Togni <r_togni@tiscali.it> | 2003-11-01 01:28:19 +0300 |
commit | bc0219fd9583da3e73b0363ca0588d7a53d954c0 (patch) | |
tree | e97d4a788df95c0f95485655424957ccc8c30294 /libavcodec/msrle.c | |
parent | ddaae6a9d1ea69b55b842b65e5c664b1e6d15e13 (diff) |
Don't memcpy from unallocated memory
Originally committed as revision 2459 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/msrle.c')
-rw-r--r-- | libavcodec/msrle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index 8943ef3cdf..f0564a9ca8 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -177,7 +177,8 @@ static int msrle_decode_frame(AVCodecContext *avctx, } /* grossly inefficient, but...oh well */ - memcpy(s->frame.data[0], s->prev_frame.data[0], + if (s->prev_frame.data[0] != NULL) + memcpy(s->frame.data[0], s->prev_frame.data[0], s->frame.linesize[0] * s->avctx->height); msrle_decode_pal8(s); |