From 3a1943c1c14107f4824028a65af02e8427baeeae Mon Sep 17 00:00:00 2001 From: Jacob Adams Date: Sat, 4 Apr 2015 18:14:44 -0400 Subject: [PATCH] devmand: properly prevent overflow closes #22 Change-Id: Ia10f352a7ff5b05b1095dbb65d36316f9165a6f0 --- minix/commands/devmand/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.44.0