From 162383f90ef41f01b8d460f8152d9c07a6b2a7c3 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Fri, 7 Dec 2018 13:00:49 +0900 Subject: [PATCH] Fix array subscript is above array bounds Change-Id: I783904d2d1e535623731c59c59eee3e2fa41d1a2 --- src/common/media-svc-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/media-svc-util.c b/src/common/media-svc-util.c index fc0ae7f..e9c7445 100755 --- a/src/common/media-svc-util.c +++ b/src/common/media-svc-util.c @@ -348,7 +348,7 @@ static int __media_svc_get_content_type_from_mime(const char *path, const char * /*in application type, exitst sound file ex) x-smafs, asf */ if (*category & MEDIA_SVC_CATEGORY_ETC) { - int prefix_len = strlen(content_category[MEDIA_SVC_CATEGORY_ETC].content_type) + 1; + int prefix_len = strlen(content_category[3].content_type) + 1; char *ext = NULL; for (idx = 0; idx < SOUND_MIME_NUM; idx++) { @@ -388,7 +388,7 @@ static int __media_svc_get_content_type_from_mime(const char *path, const char * /*check music file in sound files. */ if (*category & MEDIA_SVC_CATEGORY_SOUND) { - int prefix_len = strlen(content_category[MEDIA_SVC_CATEGORY_SOUND].content_type) + 1; + int prefix_len = strlen(content_category[0].content_type) + 1; for (idx = 0; idx < MUSIC_MIME_NUM; idx++) { if (strcmp(mimetype + prefix_len, music_mime_table[idx]) == 0) { -- 2.7.4