summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVicky Martinez-DeFrain <vmdefrain@gmail.com>2012-02-09 16:59:41 -0600
committerDaniel Levin <dendy@ti.com>2012-07-25 08:55:39 -0500
commitddd4fd79b918181ab3f6d1064f1dd22c3c1024cd (patch)
tree30c21bf6affb43c7c4dd5d88bac71820eea916c5
parentb599a841ee50620438d20ff0b5be96edea73fff2 (diff)
parent0b63d71be070036363c89553efc196a62de0d756 (diff)
downloadhardware_ti_omap4-ddd4fd79b918181ab3f6d1064f1dd22c3c1024cd.zip
hardware_ti_omap4-ddd4fd79b918181ab3f6d1064f1dd22c3c1024cd.tar.gz
hardware_ti_omap4-ddd4fd79b918181ab3f6d1064f1dd22c3c1024cd.tar.bz2
Merge "CameraHAL: Fixed memory corruption while JPEG encoding" into p-ics-mr1
-rw-r--r--camera/Encoder_libjpeg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/camera/Encoder_libjpeg.cpp b/camera/Encoder_libjpeg.cpp
index deed61a..d4eca43 100644
--- a/camera/Encoder_libjpeg.cpp
+++ b/camera/Encoder_libjpeg.cpp
@@ -421,7 +421,7 @@ size_t Encoder_libjpeg::encode(params* input) {
jpeg_start_compress(&cinfo, TRUE);
- row_tmp = (uint8_t*)malloc(out_width * 3);
+ row_tmp = (uint8_t*)malloc((out_width - right_crop) * 3);
row_src = src + start_offset;
row_uv = src + out_width * out_height * bpp;