Commit 2503fd7d authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

proc: parse -- Fix length for smaps maj/min parshing

Otherwise

 | Error (proc_parse.c:227): Can't parse: 555555554000-555555577000 r-xp 00000000 b6:d2f61 133545                  /sbin/init
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 14a7aff2
...@@ -220,7 +220,7 @@ int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list, bool use_map_file ...@@ -220,7 +220,7 @@ int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list, bool use_map_file
goto err; goto err;
memset(file_path, 0, 6); memset(file_path, 0, 6);
num = sscanf(buf, "%lx-%lx %c%c%c%c %lx %02x:%02x %lu %5s", num = sscanf(buf, "%lx-%lx %c%c%c%c %lx %x:%x %lu %5s",
&start, &end, &r, &w, &x, &s, &pgoff, &dev_maj, &start, &end, &r, &w, &x, &s, &pgoff, &dev_maj,
&dev_min, &ino, file_path); &dev_min, &ino, file_path);
if (num < 10) { if (num < 10) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment