From: Sangchul Lee Date: Thu, 16 Jun 2016 05:35:59 +0000 (+0900) Subject: Fix SVACE defects X-Git-Tag: accepted/tizen/mobile/20160620.082332^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F74916%2F3;p=platform%2Fadaptation%2Fspreadtrum%2Faudio-hal-sc7727.git Fix SVACE defects [Version] 0.1.12 [Profile] Mobile [Issue Type] Bug Fix Change-Id: I2008c8b0c23de8e6517927156e2738f413fbe71d Signed-off-by: Sangchul Lee --- diff --git a/packaging/audio-hal-sc7727.spec b/packaging/audio-hal-sc7727.spec index 9adb3dc..9bd0580 100644 --- a/packaging/audio-hal-sc7727.spec +++ b/packaging/audio-hal-sc7727.spec @@ -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 diff --git a/tizen-audio-volume.c b/tizen-audio-volume.c index 904e720..da10975 100644 --- a/tizen-audio-volume.c +++ b/tizen-audio-volume.c @@ -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; }