summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorcem <cem@FreeBSD.org>2016-06-07 20:00:20 +0000
committercem <cem@FreeBSD.org>2016-06-07 20:00:20 +0000
commit19014d17cccd2880705c6b306cc52deb94c3aaba (patch)
treef18b413bb9e4cecf621cdf22901c2bb980cefee7 /lib/libc/stdlib
parent3b6ce85def33ecb4ad25a28b38f8cce3c529e33f (diff)
downloadFreeBSD-src-19014d17cccd2880705c6b306cc52deb94c3aaba.zip
FreeBSD-src-19014d17cccd2880705c6b306cc52deb94c3aaba.tar.gz
nfs_clvfsops: Prevent strdup of stack garbage with bogus mount specs
If strlen(hostp) was zero, the stack array 'nam' would never be initialized before being strdup()ed. Fix this by initializing it to the empty string. It's possible some external condition makes this case impossible, in which case, an assertion instead of this workaround is appropriate. Introduced in r299848. Reported by: Coverity CID: 1355336 Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/stdlib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud