[FIX] Make Parsee not crash on some NULL strings

If only strlen had NULL-checking...
This commit is contained in:
LDA 2024-06-26 02:56:03 +02:00
commit 9101cf8409

View file

@ -155,7 +155,8 @@ XMPPifyElement(HashMap *event, XMLElement *elem, XMPPFlags flags)
#define Concat(strp) do \
{ \
size_t cidx; \
for (cidx = 0; cidx < strlen(strp); cidx++) \
size_t len = strp ? strlen(strp) : 0; \
for (cidx = 0; cidx < len; cidx++) \
{ \
char cch[2] = { strp[cidx], 0 }; \
char nch = *cch ? strp[cidx+1] : '\0'; \