diff options
author | cem <cem@FreeBSD.org> | 2016-06-07 20:00:20 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2016-06-07 20:00:20 +0000 |
commit | 19014d17cccd2880705c6b306cc52deb94c3aaba (patch) | |
tree | f18b413bb9e4cecf621cdf22901c2bb980cefee7 /lib/libc/stdlib | |
parent | 3b6ce85def33ecb4ad25a28b38f8cce3c529e33f (diff) | |
download | FreeBSD-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