mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit 'e10659244782b26061e7d52c06437de32a43a7af'
* commit 'e10659244782b26061e7d52c06437de32a43a7af': qtrle: add more checks against pixel_ptr being negative. Conflicts: libavcodec/qtrle.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
9ba38e6273
|
@ -128,7 +128,7 @@ static inline void qtrle_decode_2n4bpp(QtrleContext *s, int row_ptr,
|
|||
|
||||
while (lines_to_change--) {
|
||||
pixel_ptr = row_ptr + (num_pixels * (bytestream2_get_byte(&s->g) - 1));
|
||||
CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */
|
||||
CHECK_PIXEL_PTR(0);
|
||||
|
||||
while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {
|
||||
if (rle_code == 0) {
|
||||
|
@ -183,7 +183,7 @@ static void qtrle_decode_8bpp(QtrleContext *s, int row_ptr, int lines_to_change)
|
|||
|
||||
while (lines_to_change--) {
|
||||
pixel_ptr = row_ptr + (4 * (bytestream2_get_byte(&s->g) - 1));
|
||||
CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */
|
||||
CHECK_PIXEL_PTR(0);
|
||||
|
||||
while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {
|
||||
if (rle_code == 0) {
|
||||
|
@ -233,7 +233,7 @@ static void qtrle_decode_16bpp(QtrleContext *s, int row_ptr, int lines_to_change
|
|||
|
||||
while (lines_to_change--) {
|
||||
pixel_ptr = row_ptr + (bytestream2_get_byte(&s->g) - 1) * 2;
|
||||
CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */
|
||||
CHECK_PIXEL_PTR(0);
|
||||
|
||||
while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {
|
||||
if (rle_code == 0) {
|
||||
|
@ -277,7 +277,7 @@ static void qtrle_decode_24bpp(QtrleContext *s, int row_ptr, int lines_to_change
|
|||
|
||||
while (lines_to_change--) {
|
||||
pixel_ptr = row_ptr + (bytestream2_get_byte(&s->g) - 1) * 3;
|
||||
CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */
|
||||
CHECK_PIXEL_PTR(0);
|
||||
|
||||
while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {
|
||||
if (rle_code == 0) {
|
||||
|
@ -324,7 +324,7 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change
|
|||
|
||||
while (lines_to_change--) {
|
||||
pixel_ptr = row_ptr + (bytestream2_get_byte(&s->g) - 1) * 4;
|
||||
CHECK_PIXEL_PTR(0); /* make sure pixel_ptr is positive */
|
||||
CHECK_PIXEL_PTR(0);
|
||||
|
||||
while ((rle_code = (signed char)bytestream2_get_byte(&s->g)) != -1) {
|
||||
if (rle_code == 0) {
|
||||
|
|
Loading…
Reference in New Issue