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

Commit 3de3dfe9 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: neuron: channel: Check buffer boundaries"

parents 174db10e ca1c9dc6
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -180,6 +180,8 @@ static int read_config(struct neuron_mq_data_priv *priv)
	msgq->message_alignment = hdr->message_alignment;
	msgq->message_alignment = hdr->message_alignment;
	/* Get ring_buffer_len value. */
	/* Get ring_buffer_len value. */
	msgq->ring_buffer_len = hdr->ring_buffer_len;
	msgq->ring_buffer_len = hdr->ring_buffer_len;
	if (msgq->ring_buffer_len > resource_size(&priv->buffer))
		return -ECONNRESET;
	/* Get tail_offset, making sure the value is valid. */
	/* Get tail_offset, making sure the value is valid. */
	offset = hdr->tail_offset;
	offset = hdr->tail_offset;
	if (offset > resource_size(&priv->buffer))
	if (offset > resource_size(&priv->buffer))