Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d52907fe authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Potential Null Pointer Dereference of user buf"

parents c51e4460 5d87a0bc
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1180,7 +1180,10 @@ static int diagchar_read(struct file *file, char __user *buf, size_t count,
		pr_err("diag: Client PID not found in table");
		return -EINVAL;
	}

	if (!buf) {
		pr_err("diag: bad address from user side\n");
		return -EFAULT;
	}
	wait_event_interruptible(driver->wait_q, driver->data_ready[index]);

	mutex_lock(&driver->diagchar_mutex);