summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2016-01-12 12:08:03 -0600
committerMark Salyzyn2016-01-12 12:09:31 -0600
commit4690640760983dffa9b28e257aac293da4282e85 (patch)
treeb63e749c817f897542a84efeedc47d95aa9b6e7d /logd/LogListener.cpp
parente4b332c7e4ce19e1e2e6d8fe001d8c9e1709f280 (diff)
downloadplatform-system-core-4690640760983dffa9b28e257aac293da4282e85.tar.gz
platform-system-core-4690640760983dffa9b28e257aac293da4282e85.tar.xz
platform-system-core-4690640760983dffa9b28e257aac293da4282e85.zip
logd: unaligned access on security buffer
Bug: 26485626 Change-Id: I990447ca59982bb2de15decda575fd0e2838b5ed
Diffstat (limited to 'logd/LogListener.cpp')
-rw-r--r--logd/LogListener.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/logd/LogListener.cpp b/logd/LogListener.cpp
index 5348a2db6..846dd7c41 100644
--- a/logd/LogListener.cpp
+++ b/logd/LogListener.cpp
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include <limits.h> 17#include <limits.h>
18#include <sys/cdefs.h>
18#include <sys/prctl.h> 19#include <sys/prctl.h>
19#include <sys/socket.h> 20#include <sys/socket.h>
20#include <sys/types.h> 21#include <sys/types.h>
@@ -46,7 +47,7 @@ bool LogListener::onDataAvailable(SocketClient *cli) {
46 + LOGGER_ENTRY_MAX_PAYLOAD]; 47 + LOGGER_ENTRY_MAX_PAYLOAD];
47 struct iovec iov = { buffer, sizeof(buffer) }; 48 struct iovec iov = { buffer, sizeof(buffer) };
48 49
49 char control[CMSG_SPACE(sizeof(struct ucred))]; 50 char control[CMSG_SPACE(sizeof(struct ucred))] __aligned(4);
50 struct msghdr hdr = { 51 struct msghdr hdr = {
51 NULL, 52 NULL,
52 0, 53 0,