diff options
author | BearBabyLiu <[email protected]> | 2016-09-30 04:33:09 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-09-29 13:33:09 -0700 |
commit | 0b78aeae927833de580e140375a15ea5ea9d924a (patch) | |
tree | 1781702621f0857b1c0586f5f825642609c8f5f0 /lib/libzfs/libzfs_diff.c | |
parent | e8ac4557af67a46a2cb90bd7db4d426c0b358d51 (diff) |
Fix coverity defects: CID 147443, 147656, 147655, 147441, 147653
coverity scan CID:147443, Type: Buffer not null terminated
coverity scan CID:147656, Type: Copy into fixed size buffer
coverity scan CID:147655, Type: Copy into fixed size buffer
coverity scan CID:147441, Type: Buffer not null terminated
coverity scan CID:147653, Type: Copy into fixed size buffer
Reviewed-by: Richard Laager <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: liuhuang <[email protected]>
Closes #5165
Diffstat (limited to 'lib/libzfs/libzfs_diff.c')
-rw-r--r-- | lib/libzfs/libzfs_diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c index f5c799529..419189aa8 100644 --- a/lib/libzfs/libzfs_diff.c +++ b/lib/libzfs/libzfs_diff.c @@ -425,7 +425,7 @@ differ(void *arg) if ((ofp = fdopen(di->outputfd, "w")) == NULL) { di->zerr = errno; - strncpy(di->errbuf, strerror(errno), sizeof (di->errbuf)); + strlcpy(di->errbuf, strerror(errno), sizeof (di->errbuf)); (void) close(di->datafd); return ((void *)-1); } |