Commit 754f8466 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/msrle: check return code for success before use

The check is possibly redundant, but better to check for errors
that dont occur than to skip the check and crash

Fixes CID1197060
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f87b3d55
......@@ -116,6 +116,9 @@ static int msrle_decode_frame(AVCodecContext *avctx,
uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
int i, j;
if (linesize < 0)
return linesize;
for (i = 0; i < avctx->height; i++) {
if (avctx->bits_per_coded_sample == 4) {
for (j = 0; j < avctx->width - 1; j += 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment