comparison 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
comparison
equal deleted inserted replaced
1590:2d5dd2f9f760 1591:776dec60c40c
175 printf (" MS RLE: get_buffer() failed\n"); 175 printf (" MS RLE: get_buffer() failed\n");
176 return -1; 176 return -1;
177 } 177 }
178 178
179 /* grossly inefficient, but...oh well */ 179 /* grossly inefficient, but...oh well */
180 memcpy(s->frame.data[0], s->prev_frame.data[0], 180 if (s->prev_frame.data[0] != NULL)
181 memcpy(s->frame.data[0], s->prev_frame.data[0],
181 s->frame.linesize[0] * s->avctx->height); 182 s->frame.linesize[0] * s->avctx->height);
182 183
183 msrle_decode_pal8(s); 184 msrle_decode_pal8(s);
184 185
185 if (s->frame.data[0]) 186 if (s->frame.data[0])