aboutsummaryrefslogtreecommitdiffstats
path: root/XUtils.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2022-06-03 08:55:20 +0200
committerDaniel Lange <DLange@git.local>2022-06-03 08:55:20 +0200
commit937052b231259a47d881d539ad5748245ef55b99 (patch)
tree41071229fa007d8cf6902bb9253d2acd8cc66979 /XUtils.c
parent1b805a31720727008b32b1129a167758519fd4db (diff)
downloaddebian_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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/XUtils.c b/XUtils.c
index b34a8a7..2012b6c 100644
--- a/XUtils.c
+++ b/XUtils.c
@@ -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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy