Added fix from David Vrabel <dvrabel@arcom.co.uk> for a
buffer overrun in find_real_root_device(), fixing bug #1019 -Erik
This commit is contained in:
parent
88f50b6bf5
commit
f9ca653faa
@ -1636,7 +1636,7 @@ extern int find_real_root_device_name(char* name)
|
|||||||
if (strcmp(entry->d_name, "..") == 0)
|
if (strcmp(entry->d_name, "..") == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sprintf( fileName, "/dev/%s", entry->d_name);
|
snprintf( fileName, strlen(name)+1, "/dev/%s", entry->d_name);
|
||||||
|
|
||||||
if (stat(fileName, &statBuf) != 0)
|
if (stat(fileName, &statBuf) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user