Add assert check for hash_func before use 23/96323/3 accepted/tizen/3.0/common/20161114.082618 accepted/tizen/3.0/ivi/20161110.021447 accepted/tizen/3.0/mobile/20161110.021348 accepted/tizen/3.0/tv/20161110.021410 accepted/tizen/3.0/wearable/20161110.021430 submit/tizen_3.0/20161109.024556 submit/tizen_3.0_common/20161110.084657
authorSeungbae Shin <seungbae.shin@samsung.com>
Tue, 8 Nov 2016 12:26:55 +0000 (21:26 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Wed, 9 Nov 2016 02:43:54 +0000 (11:43 +0900)
[Version] 5.0.99
[Profile] Common
[Issue Type] Exception check

Change-Id: Iebb59d3197c8af0eecf592cb054ea705d71662d1

packaging/pulseaudio.spec
src/pulsecore/hashmap.c

index 052eae1..7ff355b 100644 (file)
@@ -11,7 +11,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          5.0
-Release:          98
+Release:          99
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
 URL:              http://pulseaudio.org
index 2cc03cb..384f16b 100644 (file)
@@ -138,6 +138,9 @@ int pa_hashmap_put(pa_hashmap *h, void *key, void *value) {
     unsigned hash;
 
     pa_assert(h);
+#ifdef __TIZEN__
+    pa_assert(h->hash_func);
+#endif
 
     hash = h->hash_func(key) % NBUCKETS;
 
@@ -180,6 +183,9 @@ void* pa_hashmap_get(pa_hashmap *h, const void *key) {
     struct hashmap_entry *e;
 
     pa_assert(h);
+#ifdef __TIZEN__
+    pa_assert(h->hash_func);
+#endif
 
     hash = h->hash_func(key) % NBUCKETS;
 
@@ -195,6 +201,9 @@ void* pa_hashmap_remove(pa_hashmap *h, const void *key) {
     void *data;
 
     pa_assert(h);
+#ifdef __TIZEN__
+    pa_assert(h->hash_func);
+#endif
 
     hash = h->hash_func(key) % NBUCKETS;