Unverified Commit b537d545 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9741 scsi: qedf: Ensure the copied buf is NUL terminated

parents fb35fa22 cfb3b8be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ qedf_dbg_debug_cmd_write(struct file *filp, const char __user *buffer,
	if (!count || *ppos)
		return 0;

	kern_buf = memdup_user(buffer, count);
	kern_buf = memdup_user_nul(buffer, count);
	if (IS_ERR(kern_buf))
		return PTR_ERR(kern_buf);