]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r299704:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 3 Dec 2016 16:52:40 +0000 (16:52 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 3 Dec 2016 16:52:40 +0000 (16:52 +0000)
commit29afc60e6ed36f33d1b15d68d0412eb6f68a9f03
tree33033fa29bdb67ff59acf6834b09db207202329f
parentd6c7b39c20a6a4031e29b0d53af9ba2b4d80a148
MFC r299704:
r299704 (by vangyzen):

iconvctl(3): remove superfluous NULL pointer tests

convname and dst are guaranteed to be non-NULL by iconv_open(3).
src is an array. Remove these tests for NULL pointers.
While I'm here, eliminate a strlcpy with a correct but suspicious-looking
calculation for the third parameter (i.e. not a simple sizeof).
Compare the strings in-place instead of copying.

Found by: bdrewery
Found by: Coverity
CID: 11300501130056

git-svn-id: svn://svn.freebsd.org/base/stable/10@309482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
etc/mtree/BSD.tests.dist
lib/libc/iconv/bsd_iconv.c
lib/libc/tests/Makefile
lib/libc/tests/iconv/Makefile [new file with mode: 0644]
lib/libc/tests/iconv/iconvctl_test.c [new file with mode: 0644]