mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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 <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: liuhuang <liu.huang@zte.com.cn> Closes #5165
This commit is contained in:
committed by
Brian Behlendorf
parent
e8ac4557af
commit
0b78aeae92
+1
-1
@@ -6768,7 +6768,7 @@ zfs_do_bookmark(int argc, char **argv)
|
||||
* Snapshot name begins with @.
|
||||
* Default to same fs as bookmark.
|
||||
*/
|
||||
(void) strncpy(snapname, argv[1], sizeof (snapname));
|
||||
(void) strlcpy(snapname, argv[1], sizeof (snapname));
|
||||
*strchr(snapname, '#') = '\0';
|
||||
(void) strlcat(snapname, argv[0], sizeof (snapname));
|
||||
} else {
|
||||
|
||||
@@ -548,7 +548,7 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
||||
{
|
||||
zfs_cmd_t zc = {"\0"};
|
||||
|
||||
(void) strcpy(zc.zc_name, pool);
|
||||
(void) strlcpy(zc.zc_name, pool, sizeof (zc.zc_name));
|
||||
zc.zc_inject_record = *record;
|
||||
zc.zc_guid = flags;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user