summaryrefslogtreecommitdiff
path: root/libs/input/KeyCharacterMap.cpp
diff options
context:
space:
mode:
author Dichen Zhang <dichenzhang@google.com> 2023-04-14 16:57:34 +0000
committer Dichen Zhang <dichenzhang@google.com> 2023-04-18 01:50:38 +0000
commit56a7d594d98466b21d5ec499b817d55874bb8063 (patch)
treee739954ff28ca244870bd0b557de846a0331c5c1 /libs/input/KeyCharacterMap.cpp
parent5d39549b47832f38a9ee4c8c35a6e9c6fc56fbf1 (diff)
JPEG/R: lift the checking criteria for width 8-alignment
JPEG/R library uses jpeg-turbo for JPEG encoding, which runs DCT transform on block size of 16x16 for luma, and 8x8 for chroma. The resolution in the bug report is not 16-aligned and it results in null pointer dereference for the last line in jpeg-turbo. The original checking for 8-alignment width was wrong (should check 16-alignment). jpeg-turbo has some edge case handling for this case, and it requires some extra room at the end of input. This change removed the checking criteria by adding a padding zero method. A reason size of the padding zeros is a CB block, which is 8x8, 64 bytes. Bug: 277982036 Test: CTS: ImageReaderTest#testJpegR, uint test: jpegrencoderhelper_test.cpp Change-Id: I1313a002db6d4bc63b32dc3dd3d6ccdf06779149
Diffstat (limited to 'libs/input/KeyCharacterMap.cpp')
0 files changed, 0 insertions, 0 deletions