From d4a0ece7bfa8a0337ad11d78aded3dfea29c67f2 Mon Sep 17 00:00:00 2001 From: Kfir Shtober Date: Sat, 9 Oct 2021 22:27:15 +0300 Subject: [PATCH] Fix wrong member types in the proc_stat struct It appears that `ctxt` and `processes` members of the proc_stat struct might exceed the size of unsigned int, fixing this bug by using unsigned long long instead. --- include/pfs/types.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pfs/types.hpp b/include/pfs/types.hpp index 6e39463..609cf0e 100644 --- a/include/pfs/types.hpp +++ b/include/pfs/types.hpp @@ -385,9 +385,9 @@ struct proc_stat sequence cpus; sequence intr; - size_t ctxt; + unsigned long long ctxt; std::chrono::system_clock::time_point btime; - size_t processes; + unsigned long long processes; size_t procs_running; size_t procs_blocked; sequence softirq;