summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-03 16:42:17 -0700
committerJeremy Allison <jra@samba.org>2011-05-04 12:12:15 -0700
commitdf023b8657cab232df88d3656aa5d87676bb7254 (patch)
treeacaedf7d93de593d4d843f80e7c03ea6f1ec99a7 /lib/util
parenta3e913ae8bfaa88f5b571f3347f3357a9ff02ed1 (diff)
downloadsamba-df023b8657cab232df88d3656aa5d87676bb7254.tar.gz
samba-df023b8657cab232df88d3656aa5d87676bb7254.tar.bz2
samba-df023b8657cab232df88d3656aa5d87676bb7254.zip
Tidy up some missing checks for NULL in strlcpy.
Diffstat (limited to 'lib/util')
-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) */