summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstderr64 <linuxwizard@voidnet.dy.fi>2024-01-29 21:18:46 +0200
committerstderr64 <linuxwizard@voidnet.dy.fi>2024-01-29 21:18:46 +0200
commit70e822c0e3339cede1225e811593bb7fb5906f3b (patch)
tree2fcc685996629f62a06828b8ca8d4c05191abc85
parent4d8e92033a32e17b0f5875aa67f0ccc67a212cc7 (diff)
downloadCWebHook-70e822c0e3339cede1225e811593bb7fb5906f3b.tar.gz
CWebHook-70e822c0e3339cede1225e811593bb7fb5906f3b.tar.zst
Also check if dststr is NULL
-rw-r--r--str_fns.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/str_fns.h b/str_fns.h
index d580231..4d005e5 100644
--- a/str_fns.h
+++ b/str_fns.h
@@ -1,7 +1,7 @@
bool str_copy( char *dststr, char *srcstr, size_t max_chars ){
if ( max_chars <= 0 )
return false;
- if ( srcstr == NULL )
+ if ( srcstr == NULL || dststr == NULL )
return false;
size_t src_len = (size_t)strnlen( srcstr, max_chars );
if ( src_len <= 0 )