Something went wrong. Try again.
forked from shirou/gopsutil
Something went wrong. Try again.
fix: add bounds check for /proc/[pid]/stat fields to prevent panic
fillFromTIDStatWithContext accesses fields up to index 22 without bounds checking. This causes an index-out-of-range panic when /proc/[pid]/stat has fewer than 23 fields, which can happen in container environments or with non-standard kernels. The function already guards fields[42] with a length check but is missing the same protection for lower-indexed fields. Fixes #2070
Author Yanhu007 Date (Apr 13, 2026, 7:04 AM UTC) Commit
Copy SHA
Parent 3aab859b 3aab859bd983de7cf4c220ca90445e7e35145639