aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorRoberto Togni <r_togni@tiscali.it>2003-10-31 22:28:19 +0000
committerRoberto Togni <r_togni@tiscali.it>2003-10-31 22:28:19 +0000
commitbc0219fd9583da3e73b0363ca0588d7a53d954c0 (patch)
treee97d4a788df95c0f95485655424957ccc8c30294 /libavcodec
parentddaae6a9d1ea69b55b842b65e5c664b1e6d15e13 (diff)
downloadffmpeg-bc0219fd9583da3e73b0363ca0588d7a53d954c0.tar.gz
Don't memcpy from unallocated memory
Originally committed as revision 2459 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/msrle.c3
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);