summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-12 12:40:16 +0800
committerJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-14 16:32:54 +0800
commit052a035958d43c3fb0a980c0c7a93ad2073afddf (patch)
treebad3d495bd1281617bf1991453ec0e08bded5100 /ipc
parent5cfe1d90207a7407f40b783722d8bb9f89608b6b (diff)
downloaduxp-052a035958d43c3fb0a980c0c7a93ad2073afddf.tar.gz
Bug 1430745 - IPC: Fix unaligned accesses in DirReaderLinux
Tag: #1542
Diffstat (limited to 'ipc')
-rw-r--r--ipc/chromium/src/base/dir_reader_linux.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipc/chromium/src/base/dir_reader_linux.h b/ipc/chromium/src/base/dir_reader_linux.h
index 530fe2e015..e0466fc4c9 100644
--- a/ipc/chromium/src/base/dir_reader_linux.h
+++ b/ipc/chromium/src/base/dir_reader_linux.h
@@ -90,7 +90,10 @@ class DirReaderLinux {
private:
const int fd_;
- unsigned char buf_[512];
+ union {
+ linux_dirent dirent_;
+ unsigned char buf_[512];
+ };
size_t offset_, size_;
DISALLOW_COPY_AND_ASSIGN(DirReaderLinux);