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:
parent
2718a4572f
commit
c1b609db4f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue