summaryrefslogtreecommitdiff
path: root/libcutils/socket_local_server_unix.cpp
diff options
context:
space:
mode:
authorPaul Elliott <paul.elliott@arm.com>2017-11-07 11:11:41 +0000
committerMark Salyzyn <salyzyn@google.com>2017-11-07 09:57:26 -0800
commitc6ed8f39d3e4c45e83923dac93c1388526c99a3d (patch)
tree25eabb8701a885c2ad8912beca03848f00da3656 /libcutils/socket_local_server_unix.cpp
parentebcfa449375fb809b266383d0036a7be3ecdac01 (diff)
Buffer overrun in __android_log_is_loggable() fix
Fix for buffer overrun when a tag that is too big is sent to logd. Buffer supplied is precisely the right size for max message length however strlen will be run on the buffer, so need to ensure null terminator, otherwise any strlen will go off the end of the buffer. Also converted LogBuffer::Log() over to use the safer strnlen in the case where it is measuring the buffer (and converted over to using __android_log_is_loggable_len()) Signed-off-by: Paul Elliott <paul.elliott@arm.com> Test: liblog.android_log_buf_print__maxtag Change-Id: I3cb8b25af55943fb0f4658657560eb2300f52961
Diffstat (limited to 'libcutils/socket_local_server_unix.cpp')
0 files changed, 0 insertions, 0 deletions