Add to check valid width and height for _mm_push_buffer_into_pipeline_new 55/170655/4
authorJiyong Min <jiyong.min@samsung.com>
Wed, 21 Feb 2018 07:23:47 +0000 (16:23 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Thu, 22 Feb 2018 01:21:11 +0000 (10:21 +0900)
 - fix Svace issue(underflow array 'pLine[i - 1]')

Change-Id: I1274d08ff1d65c30465fe7f4a7ce9158d5357f1d
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
gstcs/mm_util_gstcs.c

index b0b9c9a20f8864cf3835604ac34fb8284e324cdf..215e4c29fd2c19dc87e0e620386ebce9b38b7776 100755 (executable)
@@ -404,6 +404,7 @@ static int _mm_push_buffer_into_pipeline_new(unsigned char *src, gstreamer_s * p
        gstcs_fenter();
 
        gstcs_retvm_if(pGstreamer_s->pipeline == NULL, GSTCS_ERROR_INVALID_PARAMETER, "Invalid pipeline");
+       gstcs_retvm_if((width == 0 || height == 0), GSTCS_ERROR_INVALID_PARAMETER, "Invalid width(%u) and height(%u)", width, height);
 
        src_size = _mm_setup_image_size(color_format, stride, elevation);