diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2015-03-27 13:55:34 +0100 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-03-27 17:42:44 +0200 |
commit | 53445bfde5014a1c246ada7d0502d2de4c1e4fc7 (patch) | |
tree | c42fc31d6b81bcc4230d5a38b4103eaf8473a176 /android/avrcp-lib.c | |
parent | a8283e94e1ecc79b275c613a0fa1dfc72fc32298 (diff) | |
download | bluez-53445bfde5014a1c246ada7d0502d2de4c1e4fc7.tar.gz |
android/avrcp-lib: Fix possible invalid read
If item length was 0 text was left uninitialized.
Diffstat (limited to 'android/avrcp-lib.c')
-rw-r--r-- | android/avrcp-lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c index 92f774431..e404494be 100644 --- a/android/avrcp-lib.c +++ b/android/avrcp-lib.c @@ -2449,6 +2449,8 @@ static int parse_attribute_list(uint8_t *params, uint16_t params_len, text[i] = g_strndup(item->data, item->len); params_len -= item->len; params += item->len; + } else { + text[i] = NULL; } } |