Fix SVACE defects 16/74916/3 accepted/tizen/mobile/20160620.082332 submit/tizen/20160617.072816
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 16 Jun 2016 05:35:59 +0000 (14:35 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 16 Jun 2016 05:47:33 +0000 (14:47 +0900)
[Version] 0.1.12
[Profile] Mobile
[Issue Type] Bug Fix

Change-Id: I2008c8b0c23de8e6517927156e2738f413fbe71d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/audio-hal-sc7727.spec
tizen-audio-volume.c

index 9adb3dc..9bd0580 100644 (file)
@@ -1,6 +1,6 @@
 Name:       audio-hal-sc7727
 Summary:    TIZEN Audio HAL for SC7727
-Version:    0.1.11
+Version:    0.1.12
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 904e720..da10975 100644 (file)
@@ -310,11 +310,12 @@ static audio_return_t __load_radio_volume_table(int** volume_table, int *number_
     }
 
     *number_of_elements = iniparser_getint(dict, RADIO_TUNING_VOLUME_LEVELS, -1);
-    if (*number_of_elements == -1) {
+    if (*number_of_elements <= 0) {
+        AUDIO_LOG_ERROR("invalid number of elements, %d", *number_of_elements);
         ret = AUDIO_ERR_INTERNAL;
         goto error;
     }
-        temp_table = (int *)malloc ((*number_of_elements) * sizeof(int));
+    temp_table = (int *)malloc((*number_of_elements) * sizeof(int));
     if (!temp_table) {
         goto error;
     }