diff options
author | Jun Fang <jun_fang@foxitsoftware.com> | 2015-10-09 13:14:54 +0800 |
---|---|---|
committer | Jun Fang <jun_fang@foxitsoftware.com> | 2015-10-09 13:14:54 +0800 |
commit | f1f19f1fff801c9970af627e050becc2f13f82e7 (patch) | |
tree | 69bf78031df3bf0f9a6c8ba9ee0ed5be4e43eec9 /core/src/fxcodec/codec/codec_int.h | |
parent | a398ca611d1925182ff6a4e8b2b43c277c364dc0 (diff) | |
download | pdfium-f1f19f1fff801c9970af627e050becc2f13f82e7.tar.xz |
Fix heap-buffer-overflow in color_sycc_to_rgb
It's a bug existing in the conversion from YUV420 to RGB.
For YUV 420 format, four pixels have 4 Y but only one U and
one V. In some cases, there are odd columns or lines in
some images. The pixels on last line or column may have Y
but no U or V data. For this case, We shall extend U or V
using the data on previous column or line.
BUG=497357
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1342683002 .
Diffstat (limited to 'core/src/fxcodec/codec/codec_int.h')
-rw-r--r-- | core/src/fxcodec/codec/codec_int.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h index b08dee7422..9f408dd9a2 100644 --- a/core/src/fxcodec/codec/codec_int.h +++ b/core/src/fxcodec/codec/codec_int.h @@ -312,6 +312,8 @@ struct DecodeData { OPJ_SIZE_T offset; }; +void sycc420_to_rgb(opj_image_t* img); + /* Wrappers for C-style callbacks. */ OPJ_SIZE_T opj_read_from_memory(void* p_buffer, OPJ_SIZE_T nb_bytes, |