Do not read past the end of the buffer
This commit is contained in:
parent
7beace62d9
commit
9def3f9efe
|
|
@ -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 New Issue
Block a user