devmand: properly prevent overflow

This commit is contained in:
Jacob Adams 2015-04-04 18:14:44 -04:00
parent 1cd28eb8e4
commit a21aa91b05

View File

@ -544,7 +544,7 @@ static enum dev_type determine_type (char *path)
return DEV_TYPE_UNKOWN; return DEV_TYPE_UNKOWN;
} }
res = fscanf(fd , "%256s\n", buf); res = fscanf(fd , "%255s\n", buf);
fclose(fd); fclose(fd);
if (res != 1) { if (res != 1) {