From fb1f0814351e0a445b163b0204e9418565888ecf Mon Sep 17 00:00:00 2001 From: Jiyong Min Date: Wed, 21 Feb 2018 16:23:47 +0900 Subject: [PATCH] Add to check valid width and height for _mm_push_buffer_into_pipeline_new - fix Svace issue(underflow array 'pLine[i - 1]') Change-Id: I1274d08ff1d65c30465fe7f4a7ce9158d5357f1d Signed-off-by: Jiyong Min --- gstcs/mm_util_gstcs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gstcs/mm_util_gstcs.c b/gstcs/mm_util_gstcs.c index b0b9c9a..215e4c2 100755 --- a/gstcs/mm_util_gstcs.c +++ b/gstcs/mm_util_gstcs.c @@ -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); -- 2.7.4