aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-11 02:20:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-11 02:20:06 +0200
commit58825a18aacca2e703e969cb064113dbb0e04b07 (patch)
tree9182bdf36ebfa380f16cef2421b209be38991e6d
parentf9505923a344a56c3ff36925adb7f0c3c9a3996c (diff)
downloadffmpeg-58825a18aacca2e703e969cb064113dbb0e04b07.tar.gz
msrle: fix regression causing null ptr dereference
Fixes Ticket1630 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/msrle.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index 2a9d95ad70..7c965d25e2 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -106,11 +106,10 @@ static int msrle_decode_frame(AVCodecContext *avctx,
s->frame.palette_has_changed = 1;
memcpy(s->pal, pal, AVPALETTE_SIZE);
}
+ /* make the palette available */
+ memcpy(s->frame.data[1], s->pal, AVPALETTE_SIZE);
}
- /* make the palette available */
- memcpy(s->frame.data[1], s->pal, AVPALETTE_SIZE);
-
/* FIXME how to correctly detect RLE ??? */
if (avctx->height * istride == avpkt->size) { /* assume uncompressed */
int linesize = (avctx->width * avctx->bits_per_coded_sample + 7) / 8;