blockdev: fix possible buffer overflow
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
33b0be6d60
commit
18c3e24341
|
@ -313,7 +313,7 @@ report_all_devices(void) {
|
|||
}
|
||||
|
||||
while (fgets(line, sizeof(line), procpt)) {
|
||||
if (sscanf (line, " %d %d %d %[^\n ]",
|
||||
if (sscanf (line, " %d %d %d %200[^\n ]",
|
||||
&ma, &mi, &sz, ptname) != 4)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue