diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2022-01-11 18:55:41 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2022-01-11 21:42:57 +0100 |
commit | fde12434432f51ed773957824aa9460f5cc99e85 (patch) | |
tree | 468aa292eefef248d6f8205b3110e6611d2f7ac3 /XUtils.h | |
parent | 6eab39c0abeb8770c184015792cd5805a4789040 (diff) |
Fix out of boundary writes in XUtils
It is possible to exceed the unsigned int data type on 64 bit systems
with enough available RAM. Use size_t in all places instead.
Proof of Concept: Create a 4 GB line in .htoprc file and run htop
$ dd if=/dev/zero bs=1024 count=4194304 | tr '\0' 'a' > ~/.htoprc
$ htop
Segmentation fault
Also avoid overflow of stack based "match" array in String_getToken.
Diffstat (limited to 'XUtils.h')
0 files changed, 0 insertions, 0 deletions