mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-02 11:59:45 -05:00
ITS#10410 lutil_strncopy: fix off by one
This commit is contained in:
parent
afafeaf407
commit
a16f196903
1 changed files with 1 additions and 1 deletions
|
|
@ -399,7 +399,7 @@ lutil_strncopy(
|
|||
if (!a || !b || n == 0)
|
||||
return a;
|
||||
|
||||
while ((*a++ = *b++) && n-- > 0) ;
|
||||
while ((*a++ = *b++) && --n > 0) ;
|
||||
return a-1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue