Mercurial > libavcodec.hg
changeset 1591:776dec60c40c libavcodec
Don't memcpy from unallocated memory
author | rtognimp |
---|---|
date | Fri, 31 Oct 2003 22:28:19 +0000 |
parents | 2d5dd2f9f760 |
children | 63009885ca88 |
files | msrle.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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);