Fix Svace issue - DEREF_OF_NULL.RET.STAT 00/295900/1 accepted/tizen/unified/20230719.102856
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 17 Jul 2023 04:45:43 +0000 (13:45 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 17 Jul 2023 04:45:43 +0000 (13:45 +0900)
[Version] 0.6.32
[Issue Type] Svace

Change-Id: Iecb25b93efa2cde4810bb7ac86e338df2471e807
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-codec.spec
src/media_codec_ini.c

index e45275d..db7b1f7 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:       capi-media-codec
 Summary:    A Media Codec library in Tizen Native API
-Version:    0.6.31
+Version:    0.6.32
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 917cc94..595d7ad 100644 (file)
@@ -124,6 +124,10 @@ do {\
                        if (x_list.property.ext_num < MEDIA_CODEC_MAX_PROPERTY_EXT) { \
                                strncpy(x_list.property.ext_name[x_list.property.ext_num], token, MEDIA_CODEC_INI_STRLEN - 1); \
                                token = strtok_r(NULL, delimiters, &usr_ptr); \
+                               if (!token) { \
+                                       LOGW("NULL value for property[%s]", x_list.property.ext_name[x_list.property.ext_num]); \
+                                       break; \
+                               } \
                                LOGI("  token[property value:%s]", token);\
                                strncpy(x_list.property.ext_value[x_list.property.ext_num], token, MEDIA_CODEC_INI_STRLEN - 1); \
                                x_list.property.ext_num++; \