Browse Source

getpass: s/sizeof(buf)-1/sizeof(buf)/ in fgets

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko 12 năm trước cách đây
mục cha
commit
d5fd9afa76
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      libc/unistd/getpass.c

+ 1 - 1
libc/unistd/getpass.c

@@ -75,7 +75,7 @@ char * getpass (const char *prompt)
   fflush(out);
 
   /* Read the password.  */
-  if (!fgets (buf, sizeof(buf)-1, in))
+  if (!fgets (buf, sizeof(buf), in))
     buf[0] = '\0';
   nread = strlen(buf);
   if (nread > 0 && buf[nread - 1] == '\n')