From f98e4e24b1fd9353c6eb2c28d588e3c2fbc1f00d Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Wed, 5 Mar 2003 05:19:35 +0000 Subject: lp_string: Add note about dodgy StrnCpy use. (This used to be commit b32ae2d83fd0b4dd2c313cd0727bd276564cec0c) --- source3/param/loadparm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 246023ba47..f7f12bbe80 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1516,6 +1516,9 @@ static char *lp_string(const char *s) if (!ret) return NULL; + /* Note: StrnCpy touches len+1 bytes, but we allocate 100 + * extra bytes so we're OK. */ + if (!s) *ret = 0; else -- cgit