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

index 6b2ba549d3ad7e0402e5d7e815f7d7b9c1fc6192..5c53d19487f840c23d39e434b748548541188a71 100644 (file)
@@ -400,7 +400,7 @@ lutil_strncopy(
                return a;
        
        while ((*a++ = *b++) && --n > 0) ;
-       return a-1;
+       return a;
 }
 
 /* memcopy is like memcpy except it returns a pointer to the byte past