diff options
author | Daniel Lange <DLange@git.local> | 2020-11-28 17:06:06 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-11-28 17:06:06 +0100 |
commit | 6c306315c87271b56b65594915644e1ff19458a4 (patch) | |
tree | 052459b9810624228c7a9e8487446a9080992482 | |
parent | a41e5c0a805e381a07a5d6d9625eb8ec6600563a (diff) |
Fix reading of device nodes > 2 chars from memory maps
-rw-r--r-- | linux/LinuxProcessList.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 1e23e88d..9c51a580 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -563,8 +563,8 @@ static uint64_t LinuxProcessList_calcLibSize(openat_arg_t procFd) { uint64_t map_start; uint64_t map_end; char map_perm[5]; - int map_devmaj; - int map_devmin; + unsigned int map_devmaj; + unsigned int map_devmin; uint64_t map_inode; // Short circuit test: Look for a slash @@ -593,11 +593,11 @@ static uint64_t LinuxProcessList_calcLibSize(openat_arg_t procFd) { if (' ' != *readptr++) continue; - map_devmaj = fast_strtoull_hex(&readptr, 2); + map_devmaj = fast_strtoull_hex(&readptr, 4); if (':' != *readptr++) continue; - map_devmin = fast_strtoull_hex(&readptr, 2); + map_devmin = fast_strtoull_hex(&readptr, 4); if (' ' != *readptr++) continue; |