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

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

Merge "ASoC: wcd9xxx: Fix unprotected userspace access"

parents 0d1922a0 809a8d87
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -82,7 +82,8 @@ static int wcdcal_hwdep_ioctl_shared(struct snd_hwdep *hw,
		return -EFAULT;
	}
	data = fw[fw_user.cal_type]->data;
	memcpy(data, fw_user.buffer, fw_user.size);
	if (copy_from_user(data, fw_user.buffer, fw_user.size))
		return -EFAULT;
	fw[fw_user.cal_type]->size = fw_user.size;
	mutex_lock(&fw_data->lock);
	set_bit(WCDCAL_RECIEVED, &fw_data->wcdcal_state[fw_user.cal_type]);