diff options
author | Samuel Holland <samuel@sholland.org> | 2020-03-28 20:58:34 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2020-03-28 21:02:02 -0500 |
commit | 585d0700c7dbbc3cf032ad2e710d48eda85dd7ce (patch) | |
tree | 16f1d3922cc64132bd9d1b2bf95507265841273d /testcases/004-run-watch/expected_output.txt | |
parent | 3374e1605d718816d08ba91721aa82ec73086b9d (diff) |
avoid out-of-bounds read after invalid %cpu conversion
In the case where no CPU number is given, skipping a character of
padding actually skips the null terminator, causing further iterations
through the loop to read out of bounds. Have sscanf() return the number
of characters read, instead of reconstructing it from the CPU number.
This was observed as a failure in test 024-cpu-usage-invalid-cpu.
Diffstat (limited to 'testcases/004-run-watch/expected_output.txt')
0 files changed, 0 insertions, 0 deletions