summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-12 12:40:16 +0800
committerMoonchild <moonchild@palemoon.org>2020-05-20 14:04:01 +0000
commit15ac4021b06d549e47c9e2efc9364a9eb96bfe82 (patch)
tree64338149f59ed3bf8e3aa5ae3470c130e2548322 /ipc
parent344b2729914d8f038d283b545744c61c79062a94 (diff)
downloaduxp-15ac4021b06d549e47c9e2efc9364a9eb96bfe82.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);