From 7dac110e2430c8867de1fb9ab833d609801b4443 Mon Sep 17 00:00:00 2001 From: Haejeong Kim Date: Mon, 24 Jul 2017 17:58:02 +0900 Subject: [PATCH] Fix Svace Issue Change-Id: If9a855b346de1706e98bb2c5ec024d656a4b604c --- src/image_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/image_util.c b/src/image_util.c index c389703..a099a6b 100755 --- a/src/image_util.c +++ b/src/image_util.c @@ -1881,7 +1881,9 @@ int image_util_encode_set_input_buffer(image_util_encode_h handle, const unsigne _handle->current_delay_count = 0; } _handle->src_buffer = (void *)realloc(_handle->src_buffer, (_handle->current_buffer_count + 1) * sizeof(void *)); - _handle->src_buffer[_handle->current_buffer_count] = (void *)src_buffer; + + if (_handle->src_buffer != NULL) + _handle->src_buffer[_handle->current_buffer_count] = (void *)src_buffer; } else { if (_handle->src_buffer == NULL) _handle->src_buffer = (void *)calloc(1, sizeof(void *)); -- 2.7.4