Fix 64bit crash & tc fail when get content info from buffer 87/93387/1 accepted/tizen/common/20161025.155104 accepted/tizen/common/20161031.121750 accepted/tizen/ivi/20161101.004509 accepted/tizen/mobile/20161101.004417 accepted/tizen/tv/20161101.004436 accepted/tizen/wearable/20161101.004449 submit/tizen/20161025.104308 submit/tizen/20161031.023900 submit/tizen_3.0_common/20161104.104000
authorJiyong Min <jiyong.min@samsung.com>
Mon, 24 Oct 2016 05:20:51 +0000 (14:20 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 24 Oct 2016 05:27:53 +0000 (14:27 +0900)
 [Problem] 64bit address is 8 byte(64bit), so the URI of memory buffer should be assigned to 8 byte string.
          The typecast of memory buffer is changed from unsigned int(4 byte) to unsigned long(8 byte).
          In 32bit, unsigned int and unsigned long are 4 byte. It has no problem for 32bit.

Change-Id: I09fa95e4c1cf937651c1c4e77d30053f577d7c2d
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
formats/ffmpeg/mm_file_formats.c
packaging/libmm-fileinfo.spec

index 40d334f..ebd19d1 100755 (executable)
@@ -477,7 +477,7 @@ _PreprocessFile(MMFileSourceType *fileSrc, char **urifilename, int *formatEnum)
        } else if (fileSrc->type == MM_FILE_SRC_TYPE_MEMORY) {
                char tempURIBuffer[MMFILE_URI_MAX_LEN] = {0, };
 
-               snprintf(tempURIBuffer, MMFILE_URI_MAX_LEN, "%s%u:%u", MMFILE_MEM_URI, (unsigned int)fileSrc->memory.ptr, fileSrc->memory.size);
+               snprintf(tempURIBuffer, MMFILE_URI_MAX_LEN, "%s%lu:%u", MMFILE_MEM_URI, (unsigned long)fileSrc->memory.ptr, fileSrc->memory.size);
                *urifilename = mmfile_strdup(tempURIBuffer);
                if (!*urifilename) {
                        debug_error("error: uri is NULL\n");
index ba141cf..14edf9a 100755 (executable)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    0.6.49
+Version:    0.6.50
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0