]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10410 lutil_strncopy: refix prev commit
authorHoward Chu <hyc@openldap.org>
Mon, 1 Dec 2025 16:16:10 +0000 (16:16 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 1 Dec 2025 16:16:10 +0000 (16:16 +0000)
libraries/liblutil/utils.c

index 5c53d19487f840c23d39e434b748548541188a71..0eb87a826195e43a2655000c953c155588f561ef 100644 (file)
@@ -400,6 +400,8 @@ lutil_strncopy(
                return a;
        
        while ((*a++ = *b++) && --n > 0) ;
+       if (n)
+               a--;
        return a;
 }