From 9214f892302615beed95222b56065655a40ff2a7 Mon Sep 17 00:00:00 2001 From: Marc TITINGER Date: Thu, 7 Oct 2021 16:29:58 +0200 Subject: dlt-system: fix a libc buffer overflow detection on 32bit targets rather self-exp: 32bits native hint will not hold 8 bits. Signed-off-by: Marc TITINGER --- src/system/dlt-system-process-handling.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/dlt-system-process-handling.c b/src/system/dlt-system-process-handling.c index 74fed7e..84259cc 100644 --- a/src/system/dlt-system-process-handling.c +++ b/src/system/dlt-system-process-handling.c @@ -192,8 +192,8 @@ int register_timer_fd(struct pollfd *pollfd, int fdcnt) /* Routine for executing LogProcess and LogFile, when timer expires */ void timer_fd_handler(int fd, DltSystemConfiguration *config) { - long int timersElapsed = 0; - int r = read(fd, &timersElapsed, 8); // only needed to reset fd event + uint64_t timersElapsed = 0ULL; + int r = read(fd, &timersElapsed, 8U); // only needed to reset fd event if (r < 0) DLT_LOG(dltsystem, DLT_LOG_ERROR, DLT_STRING("Error while reading timer fd: "), DLT_STRING(strerror(r))); -- cgit v1.2.1