Do not read past the end of the buffer
closes #22 Change-Id: I239c670915d98440c176ccf23e5270c40c4fbe81
This commit is contained in:
parent
e3cf9c04f1
commit
271999a2f3
1 changed files with 1 additions and 1 deletions
|
@ -544,7 +544,7 @@ static enum dev_type determine_type (char *path)
|
|||
return DEV_TYPE_UNKOWN;
|
||||
}
|
||||
|
||||
res = fscanf(fd , "%s\n", buf);
|
||||
res = fscanf(fd , "%256s\n", buf);
|
||||
fclose(fd);
|
||||
|
||||
if (res != 1) {
|
||||
|
|
Loading…
Reference in a new issue