[PATCH 2/2] android/avrcp-lib: Fix possible invalid read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If item length was 0 text was left uninitialized.
---
 android/avrcp-lib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c
index eba99ab..2f7d05d 100644
--- a/android/avrcp-lib.c
+++ b/android/avrcp-lib.c
@@ -2445,6 +2445,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;
 		}
 	}
 
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux