OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11c3ef8
)
android: Fix crash in property_get stub
author
Szymon Janc
<szymon.janc@tieto.com>
Thu, 17 Oct 2013 20:28:39 +0000
(22:28 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 18 Oct 2013 07:15:05 +0000
(10:15 +0300)
If value was not found and default_value was not provided NULL pointer
was passed as argument to strncpy resulting in crash.
android/cutils/properties.h
patch
|
blob
|
history
diff --git
a/android/cutils/properties.h
b/android/cutils/properties.h
index
a9f7554
..
44a712c
100644
(file)
--- a/
android/cutils/properties.h
+++ b/
android/cutils/properties.h
@@
-43,7
+43,7
@@
static inline int property_get(const char *key, char *value,
if (!env)
env = default_value;
- if (!value)
+ if (!value
|| !env
)
return 0;
strncpy(value, env, PROPERTY_VALUE_MAX);