From 14ce18c7c4ffe06ec743dbbb8bc523bb223cef5d Mon Sep 17 00:00:00 2001 From: Jun Fang Date: Fri, 9 Oct 2015 13:14:54 +0800 Subject: Merge to XFA: 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 . --- core/src/fxcodec/codec/codec_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/src/fxcodec/codec/codec_int.h') diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h index e26b542976..510d0abe78 100644 --- a/core/src/fxcodec/codec/codec_int.h +++ b/core/src/fxcodec/codec/codec_int.h @@ -426,6 +426,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, -- cgit v1.2.3