Skip to content

Commit e632fc8

Browse files
committed
strlcpy update to last openbsd version.
CVS date not changed as in fact the actual version is related to an earier date in reality. They ditched the `uintptr_t`cast finally.
1 parent df4c276 commit e632fc8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

main/strlcpy.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,7 @@ PHPAPI size_t php_strlcpy(dst, src, siz)
8383
;
8484
}
8585

86-
/*
87-
* Cast pointers to unsigned type before calculation, to avoid signed
88-
* overflow when the string ends where the MSB has changed.
89-
* Return value does not include NUL.
90-
*/
91-
return((uintptr_t)src - (uintptr_t)s - 1);
86+
return(src - s - 1);
9287
}
9388

9489
#endif /* !HAVE_STRLCPY */

0 commit comments

Comments
 (0)