Fix bug 5860: safe_strcpy gives a nasty error message for overlong strings
authorVolker Lendecke <vl@samba.org>
Sun, 2 Nov 2008 09:28:00 +0000 (10:28 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 2 Nov 2008 09:29:16 +0000 (10:29 +0100)
Thanks to Robert Dahlem <Robert.Dahlem@gmx.net> for reporting this!

source/smbd/mangle.c

index 360692c54627ab74d64068f0f382211323256b80..4d4d0dc5afbb5c70c3065a65510ed6e99a97f5a9 100644 (file)
@@ -140,7 +140,7 @@ bool name_to_8_3(const char *in,
        /* name mangling can be disabled for speed, in which case
           we just truncate the string */
        if (!lp_manglednames(p)) {
-               safe_strcpy(out,in,12);
+               strlcpy(out, in, 13);
                return True;
        }