OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc17d00
)
Add bound checks to utf16_to_utf8
author
Sergio Giro
<sgiro@google.com>
Tue, 28 Jun 2016 17:24:52 +0000
(18:24 +0100)
committer
Sergio Giro
<sgiro@google.com>
Thu, 14 Jul 2016 15:26:48 +0000
(15:26 +0000)
Bug:
29250543
Change-Id: I3518416e89ed901021970958fb6005fd69129f7c
(cherry picked from commit
1d3f4278b2666d1a145af2f54782c993aa07d1d9
)
media/libmediaplayerservice/MediaPlayerService.cpp
patch
|
blob
|
history
diff --git
a/media/libmediaplayerservice/MediaPlayerService.cpp
b/media/libmediaplayerservice/MediaPlayerService.cpp
index
56521a2
..
20e292a
100644
(file)
--- a/
media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/
media/libmediaplayerservice/MediaPlayerService.cpp
@@
-237,7
+237,8
@@
void unmarshallAudioAttributes(const Parcel& parcel, audio_attributes_t *attribu
// copying array size -1, array for tags was calloc'd, no need to NULL-terminate it
size_t tagSize = realTagSize > AUDIO_ATTRIBUTES_TAGS_MAX_SIZE - 1 ?
AUDIO_ATTRIBUTES_TAGS_MAX_SIZE - 1 : realTagSize;
- utf16_to_utf8(tags.string(), tagSize, attributes->tags);
+ utf16_to_utf8(tags.string(), tagSize, attributes->tags,
+ sizeof(attributes->tags) / sizeof(attributes->tags[0]));
}
} else {
ALOGE("unmarshallAudioAttributes() received unflattened tags, ignoring tag values");