diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 13:49:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 13:49:37 +0100 |
commit | 9ba38e62734ed2f8bd092f9eab9e6f1c017ee2e0 (patch) | |
tree | 1699e4558d4012b985dccf33734c7855c881d6d4 /libavcodec | |
parent | 9748cac5650a24d5b004a861649ab5a8274d5248 (diff) | |
parent | e10659244782b26061e7d52c06437de32a43a7af (diff) | |
download | ffmpeg-9ba38e62734ed2f8bd092f9eab9e6f1c017ee2e0.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/qtrle.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index c051d056a4..0f48f691b5 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -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) { |