From: Karel Zak Date: Tue, 3 Mar 2009 14:31:39 +0000 (+0100) Subject: simmpleinit: fix gcc warning (buffer size in read()) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e682ce7d6186b8e8aa55f584bff10b25fcb2ef3e;p=util-linux simmpleinit: fix gcc warning (buffer size in read()) 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 --- 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;