Avoid potential buffer overrun

Need to allow for terminating nul
This commit is contained in:
Paul Cornett
2019-02-17 22:32:40 -08:00
parent 36f742e2e7
commit 3b8404ce48

View File

@@ -230,7 +230,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded()
// format is: "start-end perm offset maj:min inode path", see proc(5) // format is: "start-end perm offset maj:min inode path", see proc(5)
void *start, void *start,
*end; *end;
switch ( sscanf(buf, "%p-%p %*4s %*p %*02x:%*02x %*d %1024s\n", switch ( sscanf(buf, "%p-%p %*4s %*p %*02x:%*02x %*d %1023s\n",
&start, &end, path) ) &start, &end, path) )
{ {
case 2: case 2: