mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "[Thread] make sure buffer size is enough" into main am: 82bb6fcfdc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3039092 Change-Id: Ie1372d5e4f7152426fdb9a6619617ac2d67e5895 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "socket_interface.hpp"
|
||||
|
||||
#include <errno.h>
|
||||
#include <linux/limits.h>
|
||||
#include <openthread/logging.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -273,7 +274,7 @@ void SocketInterface::WaitForSocketFileCreated(const char* aPath) {
|
||||
}
|
||||
|
||||
if (FD_ISSET(inotifyFd, &fds)) {
|
||||
char buffer[sizeof(struct inotify_event)];
|
||||
char buffer[sizeof(struct inotify_event) + NAME_MAX + 1];
|
||||
ssize_t bytesRead = read(inotifyFd, buffer, sizeof(buffer));
|
||||
|
||||
VerifyOrDie(bytesRead >= 0, OT_EXIT_ERROR_ERRNO);
|
||||
|
||||
Reference in New Issue
Block a user