Buffer overflow.

PR:		7195
Reviewed by:	phk
Submitted by:	Anders Thulin <Anders.x.thulin@telia.se>
This commit is contained in:
phk 1998-07-09 06:09:56 +00:00
parent 3421b98ff6
commit 2591f16c5a

View File

@ -133,7 +133,7 @@ usermove()
for (;;) {
(void)printf("You ask me for: ");
(void)fflush(stdout);
if (fgets(buf, BUFSIZ, stdin) == NULL)
if (fgets(buf, sizeof(buf), stdin) == NULL)
exit(0);
if (buf[0] == '\0')
continue;