-----------------------------------------------------------------------*/
#define TIME_STRING_MAX_LEN 64
#define __MMCAMCORDER_CAPTURE_WAIT_TIMEOUT 5
+#define __MMCAMCORDER_MAX_WIDTH 8192
+#define __MMCAMCORDER_MAX_HEIGHT 8192
#define FPUTC_CHECK(x_char, x_file) \
{ \
return FALSE;
}
+ /* buffer overflow prevention check */
+ if (width > __MMCAMCORDER_MAX_WIDTH || height > __MMCAMCORDER_MAX_HEIGHT) {
+ _mmcam_dbg_err("too large size %d x %d", width, height);
+ return FALSE;
+ }
+
dst_size = (width * height * 3) >> 1;
_mmcam_dbg_log("NV12 -> I420 : %dx%d, dst size %d", width, height, dst_size);