fix: string_replace_at check args validity

This commit is contained in:
2026-05-16 15:39:17 +02:00
parent 233b75e854
commit fe1fc9864c
+4
View File
@@ -62,6 +62,10 @@ char *string_replace_at(const char *src, unsigned int from, unsigned int to,
unsigned long rpl_len;
char *dst;
if (to < from) {
return "";
}
src_len = strnlen(src, STR_LEN * STR_LEN);
rpl_len = strnlen(rpl, STR_LEN * STR_LEN);