msrledec: use signed pixel_ptr in msrle_decode_pal4
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Thu, 16 Apr 2015 12:49:08 +0000 (14:49 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 17 Apr 2015 13:20:30 +0000 (15:20 +0200)
commit9a241d95efa1f6cc545a098160609fd3ba64d844
tree4961ef9378feb205c50b8f6e9aad5adb0d499b08
parent41b15817ce1eee80f2206c9d0b554f58ed322a03
msrledec: use signed pixel_ptr in msrle_decode_pal4

This fixes segmentation faults, when pic->linesize[0] is negative.
In that case 'line * pic->linesize[0] + pixel_ptr' is treated as
unsigned and wraps around.

This reverts commit 7d78a964.
The problem was introduced in commit f7e1367f, which should obsolete
that commit.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ae6fd7300b4e9f81d3b5ba201096ffe7cccf26fb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/msrledec.c