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/man.dnssec-importkey.html?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F2982%2F1;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) {