1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

lws_snprintf: check null pointer before using

This commit is contained in:
zzblydia 2024-08-23 22:15:12 +08:00 committed by Andy Green
parent 2718a4572f
commit c1b609db4f

View file

@ -867,7 +867,7 @@ lws_snprintf(char *str, size_t size, const char *format, ...)
va_list ap;
int n;
if (!size)
if (!str || !size)
return 0;
va_start(ap, format);