From 15ac4021b06d549e47c9e2efc9364a9eb96bfe82 Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Tue, 12 May 2020 12:40:16 +0800 Subject: Bug 1430745 - IPC: Fix unaligned accesses in DirReaderLinux Tag: #1542 --- ipc/chromium/src/base/dir_reader_linux.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipc/chromium/src/base/dir_reader_linux.h b/ipc/chromium/src/base/dir_reader_linux.h index 530fe2e01..e0466fc4c 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); -- cgit v1.2.3