From e682ce7d6186b8e8aa55f584bff10b25fcb2ef3e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 3 Mar 2009 15:31:39 +0100 Subject: [PATCH] simmpleinit: fix gcc warning (buffer size in read()) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit simpleinit.c:846: /usr/include/bits/unistd.h:43 warning: call to ‘__read_chk_warn’ declared with attribute warning: read called with bigger length than size of the destination buffer Signed-off-by: Karel Zak --- login-utils/simpleinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login-utils/simpleinit.c b/login-utils/simpleinit.c index 962d549b..cc844c90 100644 --- a/login-utils/simpleinit.c +++ b/login-utils/simpleinit.c @@ -843,7 +843,7 @@ static pid_t mywait (int *status) } do_longjmp = 1; /* After this, SIGCHLD will cause a jump backwards */ sigprocmask (SIG_UNBLOCK, &ss, NULL); - read (initctl_fd, buffer, COMMAND_SIZE); + read (initctl_fd, buffer, sizeof(buffer)); do_longjmp = 0; process_command (command); return 0; -- 2.39.5