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:
Eric Andersen 2000-08-11 17:45:02 +00:00
parent 88f50b6bf5
commit f9ca653faa

View File

@ -1636,7 +1636,7 @@ extern int find_real_root_device_name(char* name)
if (strcmp(entry->d_name, "..") == 0)
continue;
sprintf( fileName, "/dev/%s", entry->d_name);
snprintf( fileName, strlen(name)+1, "/dev/%s", entry->d_name);
if (stat(fileName, &statBuf) != 0)
continue;