Commit 845225fc authored by Ildar Musin's avatar Ildar Musin Committed by yonghong-song

Fix parsing of /proc/pid/maps (#2025)

Fix parsing of /proc/pid/maps
parent 415bd4e4
......@@ -92,14 +92,14 @@ int bcc_procutils_each_module(int pid, bcc_procutils_modulecb callback,
if (!procmap)
return -1;
char buf[PATH_MAX + 1], perm[5], dev[6];
char buf[PATH_MAX + 1], perm[5], dev[8];
char *name;
uint64_t begin, end, inode;
unsigned long long offset;
while (true) {
buf[0] = '\0';
// From fs/proc/task_mmu.c:show_map_vma
if (fscanf(procmap, "%lx-%lx %4s %llx %5s %lu%[^\n]", &begin, &end, perm,
if (fscanf(procmap, "%lx-%lx %4s %llx %7s %lu%[^\n]", &begin, &end, perm,
&offset, dev, &inode, buf) != 7)
break;
......
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