Svace issue fix 01/55001/1 accepted/tizen/mobile/20151221.223502 accepted/tizen/tv/20151221.223518 accepted/tizen/wearable/20151221.223536 submit/tizen/20151221.103501 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
authorHaejeong Kim <backto.kim@samsung.com>
Mon, 21 Dec 2015 08:11:37 +0000 (17:11 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Mon, 21 Dec 2015 08:11:37 +0000 (17:11 +0900)
Change-Id: Ia8a53323c9680cbddac59ffc2d73268c785066e8

formats/ffmpeg/mm_file_format_ffmpeg.c
formats/ffmpeg/mm_file_format_mp3.c
packaging/libmm-fileinfo.spec

index 782fa7c..3a4b2e2 100755 (executable)
@@ -865,9 +865,9 @@ static unsigned int _diff_memory(const void *s1, const void *s2, unsigned int n)
 {
        char *s = (char *)s1;
        char *d = (char *)s2;
-       unsigned int i;
-       unsigned int ret;
-       int tmp;
+       unsigned int i = 0;
+       unsigned int ret = 0;
+       int tmp = 0;
 
        for (i = 0, ret = 0; i < n; i++) {
                if (*s++ != *d++) {
@@ -875,7 +875,10 @@ static unsigned int _diff_memory(const void *s1, const void *s2, unsigned int n)
                        ret += (tmp < 0 ? -tmp : tmp);
                }
        }
-       ret /= n;
+
+       if (n != 0)
+               ret /= n;
+
        return ret;
 }
 
index 5e52b93..08eac0c 100755 (executable)
@@ -876,9 +876,7 @@ __AvFindStartOfMp3Header(MMFileIOHandle *hFile,  unsigned char *buf, AvFileConte
        bool bFoundSync = false;
        unsigned long  minLen;
 
-
-
-       if (pInfo->fileLen > (_AV_MP3_HEADER_POSITION_MAX + pInfo->tagV2Info.tagLen))
+       if (pInfo->fileLen > (long long)(_AV_MP3_HEADER_POSITION_MAX + pInfo->tagV2Info.tagLen))
                bufLen = _AV_MP3_HEADER_POSITION_MAX;
        else
                bufLen = pInfo->fileLen - pInfo->tagV2Info.tagLen;
@@ -1163,7 +1161,7 @@ static int mmf_file_mp3_get_infomation(char *filename, AvFileContentInfo *pInfo)
        debug_msg("pInfo->fileLen(%lld)\n", pInfo->fileLen);
 #endif
 
-       if (pInfo->fileLen > (_AV_MP3_HEADER_POSITION_MAX + pInfo->tagV2Info.tagLen)) {
+       if (pInfo->fileLen > (long long)(_AV_MP3_HEADER_POSITION_MAX + pInfo->tagV2Info.tagLen)) {
                readAmount = _AV_MP3_HEADER_POSITION_MAX + pInfo->tagV2Info.tagLen;
                buf = mmfile_malloc(readAmount);
                if (buf == NULL) {
index 9a160d4..c73e05f 100755 (executable)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    0.6.40
+Version:    0.6.41
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0