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

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

Merge "msm: ADSPRPC: Validate buffer size"

parents 5f127b54 ff15aaf4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -398,6 +398,11 @@ static int fastrpc_buf_alloc(struct fastrpc_file *fl, ssize_t size,
	int err = 0;
	struct fastrpc_buf *buf = 0, *fr = 0;
	struct hlist_node *n;

	VERIFY(err, size > 0);
	if (err)
		goto bail;

	/* find the smallest buffer that fits in the cache */
	spin_lock(&fl->hlock);
	hlist_for_each_entry_safe(buf, n, &fl->bufs, hn) {