diff options
author | Daniel Lange <DLange@git.local> | 2022-06-03 08:55:20 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2022-06-03 08:55:20 +0200 |
commit | 937052b231259a47d881d539ad5748245ef55b99 (patch) | |
tree | 41071229fa007d8cf6902bb9253d2acd8cc66979 /XUtils.c | |
parent | 1b805a31720727008b32b1129a167758519fd4db (diff) | |
download | debian_htop-937052b231259a47d881d539ad5748245ef55b99.tar.gz debian_htop-937052b231259a47d881d539ad5748245ef55b99.tar.bz2 debian_htop-937052b231259a47d881d539ad5748245ef55b99.zip |
New upstream version 3.2.1upstream/3.2.1
Diffstat (limited to 'XUtils.c')
-rw-r--r-- | XUtils.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -115,7 +115,9 @@ inline bool String_contains_i(const char* s1, const char* s2, bool multi) { char* String_cat(const char* s1, const char* s2) { const size_t l1 = strlen(s1); const size_t l2 = strlen(s2); - assert(SIZE_MAX - l1 > l2); + if (SIZE_MAX - l1 <= l2) { + fail(); + } char* out = xMalloc(l1 + l2 + 1); memcpy(out, s1, l1); memcpy(out + l1, s2, l2); |