stpncpy: fix size checking [BZ #18975]
authorZack Weinberg <zackw@panix.com>
Fri, 14 Aug 2015 13:21:44 +0000 (09:21 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 15 Aug 2015 02:40:19 +0000 (22:40 -0400)
commit8ff5e0ec497613e578219c9c3d49053c550b9269
treed35487ff0ad78c4f404883dcb2a0f7835a85137e
parent739babd775d4b69525e3494cad4310742a9b360a
stpncpy: fix size checking [BZ #18975]

I think the last clause of the conditional,

|| __n <= __bos (__dest)

may be backward.  The code should call the runtime-checking function
if __n is not constant, or if __n is known to be LARGER than the size
of the destination.
ChangeLog
NEWS
debug/tst-chk1.c
string/bits/string3.h