diff --git a/source/lib/util_str.c b/source/lib/util_str.c index c244a6b34bf..a560f61e7cb 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -695,9 +695,11 @@ char *StrnCpy_fn(const char *fn, int line,char *dest,const char *src,size_t n) clobber_region(fn, line, dest, n+1); #endif - if (!dest) + if (!dest) { + DEBUG(0,("ERROR: NULL dest in StrnCpy\n")); return(NULL); - + } + if (!src) { *dest = 0; return(dest);