diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-09-12 06:55:22 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-09-12 06:55:22 -0700 |
commit | ead7c462846401cd3cb9e770b6ab1bae2fa9d7bb (patch) | |
tree | 06cb7278abcd8f8004874be85834bcbe5be347c9 /stream.c | |
parent | 2f1fdf30d8319994069326976865190561503600 (diff) | |
download | txr-ead7c462846401cd3cb9e770b6ab1bae2fa9d7bb.tar.gz txr-ead7c462846401cd3cb9e770b6ab1bae2fa9d7bb.tar.bz2 txr-ead7c462846401cd3cb9e770b6ab1bae2fa9d7bb.zip |
Improve overflow checks in string catenation.
* lib.c (cat_str, vscat): Use size_t type for the total, so
that the wrapping behavior we depend on for overflow detection
is well-defined. Also, there was an overflow check missing for
the total + 1 beign passed to chk_wmalloc. Instead of adding
that overflow check, let's just start the total at 1.
Diffstat (limited to 'stream.c')
0 files changed, 0 insertions, 0 deletions