summaryrefslogtreecommitdiff
path: root/lib/util/string_wrappers.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/string_wrappers.h')
-rw-r--r--lib/util/string_wrappers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/string_wrappers.h b/lib/util/string_wrappers.h
index 4a5f51d96b..80d0b9932a 100644
--- a/lib/util/string_wrappers.h
+++ b/lib/util/string_wrappers.h
@@ -42,7 +42,7 @@ size_t __unsafe_string_function_usage_here_size_t__(void);
#endif /* HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS */
#define strlcpy_base(dest, src, base, size) \
- strlcpy(dest, src, size-PTR_DIFF(dest,base))
+ strlcpy((dest), (src) ? (src) : "", (size)-PTR_DIFF((dest),(base)))
/* String copy functions - macro hell below adds 'type checking' (limited,
but the best we can do in C) */