diff options
author | Sangchul Lee <sc11.lee@samsung.com> | 2016-06-16 14:35:59 +0900 |
---|---|---|
committer | Sangchul Lee <sc11.lee@samsung.com> | 2016-06-16 14:47:33 +0900 |
commit | 8f57054bdf10c9eeffda38115f22f5d707884538 (patch) | |
tree | 3a55e32455b9d51a8ed4e9fde1f26b37c4af6a6e | |
parent | a712aa1320feb49e9f2a862afa53ea79f564e9a0 (diff) | |
download | audio-hal-sc7727-8f57054bdf10c9eeffda38115f22f5d707884538.tar.gz audio-hal-sc7727-8f57054bdf10c9eeffda38115f22f5d707884538.tar.bz2 audio-hal-sc7727-8f57054bdf10c9eeffda38115f22f5d707884538.zip |
Fix SVACE defectssubmit/tizen/20160617.072816accepted/tizen/mobile/20160620.082332
[Version] 0.1.12
[Profile] Mobile
[Issue Type] Bug Fix
Change-Id: I2008c8b0c23de8e6517927156e2738f413fbe71d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
-rw-r--r-- | packaging/audio-hal-sc7727.spec | 2 | ||||
-rw-r--r-- | tizen-audio-volume.c | 5 |
2 files changed, 4 insertions, 3 deletions
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; } |