Svace issue fix 36/140936/2 accepted/tizen/4.0/unified/20170816.012147 accepted/tizen/unified/20170728.003927 submit/tizen/20170727.081109 submit/tizen_4.0/20170811.094300
authorHaejeong Kim <backto.kim@samsung.com>
Thu, 27 Jul 2017 07:24:11 +0000 (16:24 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Thu, 27 Jul 2017 07:54:39 +0000 (16:54 +0900)
Change-Id: I479294aeda58771c9646c03a3d216c621b58af11

packaging/libmm-fileinfo.spec
utils/mm_file_util_io.c
utils/mm_file_util_tag.c

index 83389a1..5fcb9ac 100755 (executable)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    0.6.63
+Version:    0.6.64
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 18c1873..93f7289 100755 (executable)
@@ -122,7 +122,7 @@ static int _mmfile_open(MMFileIOHandle **handle, struct MMFileIOFunc *Func, cons
                goto fail;
        }
 
-       memcpy(pHandle->fileName, filename, fileNameLen);
+       SAFE_STRLCPY(pHandle->fileName, filename, fileNameLen + 1);
 
        err = Func->mmfile_open(pHandle, filename, flags);
        if (err < 0) {
@@ -174,7 +174,7 @@ int mmfile_open(MMFileIOHandle **handle, const char *filename, int flags)
 
        if (*pFile == '\0') {
 file_handle:
-               strncpy(handle_str, "file", strlen("file"));
+               SAFE_STRLCPY(handle_str, "file", sizeof(handle_str));
        } else {
                *pHandleName = '\0';
        }
index fe5f672..0118779 100755 (executable)
@@ -1501,8 +1501,8 @@ int mm_file_get_int_value_from_xml_string(const char* xml_str, const char* param
                return MMFILE_UTIL_FAIL;
        }
 
-       strncpy(init_view_ret, value_start, value_length_max);
-       init_view_ret[value_length] = '\0';
+       memset(init_view_ret, 0x00, sizeof(init_view_ret));
+       SAFE_STRLCPY(init_view_ret, value_start, sizeof(init_view_ret));
 
        *value = strtol(init_view_ret, &endptr, 10);
        if (endptr == init_view_ret) {