Unverified Commit 26092368 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents c13b216d 21979567
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2077,8 +2077,10 @@ static size_t binder_get_object(struct binder_proc *proc,
	size_t object_size = 0;

	read_size = min_t(size_t, sizeof(*object), buffer->data_size - offset);
	if (offset > buffer->data_size || read_size < sizeof(*hdr))
	if (offset > buffer->data_size || read_size < sizeof(*hdr) ||
	    !IS_ALIGNED(offset, sizeof(u32)))
		return 0;

	if (u) {
		if (copy_from_user(object, u + offset, read_size))
			return 0;