]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r299524
authortruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 20 May 2016 06:02:44 +0000 (06:02 +0000)
committertruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 20 May 2016 06:02:44 +0000 (06:02 +0000)
commit84b6338e72e212cfb0fee745eebdefed52ecb25b
treef7a0572213895be442124410fb7de7129a0a5a0c
parent3e1c744aa07b988ffb00e735ef1344fe60087a9d
MFC r299524

  Use strlcpy() instead of strncpy() when copying the encoding value
  to ensure that the destination is NUL terminated.  Length truncation
  of one more character should not be an issue since encoding values
  that long are not supported by libc.  The destination string is
  treated as a NUL terminated string, but it is only passed to strcmp()
  for comparison to a set of shorter, fixed length strings, so this
  is not a serious problem.

Reported by: Coverity
CID: 974769

git-svn-id: svn://svn.freebsd.org/base/stable/10@300265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/mklocale/yacc.y