OSDN Git Service

fix buffer overflow for dc_values and ac_values (v2)
authorLim Siew Hoon <siew.hoon.lim@intel.com>
Fri, 1 Jul 2016 02:30:19 +0000 (10:30 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 22 Aug 2016 05:04:29 +0000 (13:04 +0800)
commitef5e1f1c9103d87a975f893e18e1d651be2ecd8a
treea0141f2591e46f86e90bde9cccc42875a6615d96
parente1585ac041a4c14ebca77bda4b82c8b7dc5377e5
fix buffer overflow for dc_values and ac_values (v2)

The dc_values only have 12 bytes and ac_value only 162 bytes but the
memcpy did it for 16 bytes and 256 bytes copying thru hard code value.
To avoid the array index out of bound again, recommend move to use sizeof.

v2:
Fix commit message typo from 265 bytes to 256 bytes.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit c36778ff264b3c45b538db4bbfe6aea38fcb165e)
test/decode/tinyjpeg.c