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:
82d40ad
)
unit/avrcp: Fix possible buffer overflow
author
Andrei Emeltchenko
<andrei.emeltchenko@intel.com>
Mon, 31 Mar 2014 12:25:12 +0000
(15:25 +0300)
committer
Luiz Augusto von Dentz
<luiz.von.dentz@intel.com>
Wed, 2 Apr 2014 11:25:42 +0000
(14:25 +0300)
text[] needs to be of size number for get_value_text()
unit/test-avrcp.c
patch
|
blob
|
history
diff --git
a/unit/test-avrcp.c
b/unit/test-avrcp.c
index
868d350
..
d4d26be
100644
(file)
--- a/
unit/test-avrcp.c
+++ b/
unit/test-avrcp.c
@@
-431,10
+431,15
@@
static int get_value_text(struct avrcp *session, uint8_t transaction,
uint8_t attr, uint8_t number, uint8_t *values,
void *user_data)
{
- const char *text[
] = { "on" }
;
+ const char *text[
number]
;
DBG("");
+ if (number) {
+ memset(text, 0, number);
+ text[0] = "on";
+ }
+
avrcp_get_player_values_text_rsp(session, transaction, number,
values, text);