Fix Svace Issue 67/140267/1
authorHaejeong Kim <backto.kim@samsung.com>
Mon, 24 Jul 2017 08:58:02 +0000 (17:58 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Mon, 24 Jul 2017 08:58:02 +0000 (17:58 +0900)
Change-Id: If9a855b346de1706e98bb2c5ec024d656a4b604c

src/image_util.c

index c389703..a099a6b 100755 (executable)
@@ -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 *));