From: Jacob Adams Date: Sat, 4 Apr 2015 22:14:44 +0000 (-0400) Subject: devmand: properly prevent overflow X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/verify-sign/tz-link.htm?a=commitdiff_plain;h=3a1943c1c14107f4824028a65af02e8427baeeae;p=minix.git devmand: properly prevent overflow closes #22 Change-Id: Ia10f352a7ff5b05b1095dbb65d36316f9165a6f0 --- diff --git a/minix/commands/devmand/main.c b/minix/commands/devmand/main.c index 25cc0b8a8..14810fc64 100644 --- a/minix/commands/devmand/main.c +++ b/minix/commands/devmand/main.c @@ -544,7 +544,7 @@ static enum dev_type determine_type (char *path) return DEV_TYPE_UNKOWN; } - res = fscanf(fd , "%256s\n", buf); + res = fscanf(fd , "%255s\n", buf); fclose(fd); if (res != 1) {