diff msrle.c @ 1591:776dec60c40c libavcodec

Don't memcpy from unallocated memory
author rtognimp
date Fri, 31 Oct 2003 22:28:19 +0000
parents 222643544cf1
children 63009885ca88
line wrap: on
line diff
--- a/msrle.c	Fri Oct 31 22:26:26 2003 +0000
+++ b/msrle.c	Fri Oct 31 22:28:19 2003 +0000
@@ -177,7 +177,8 @@
     }
 
     /* 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);