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

Commit 2a8e6504 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: Add check for pointer and array index"

parents acee621b 88fb0237
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -117,10 +117,14 @@ static inline void snd_mask_reset_range(struct snd_mask *mask,

static inline void snd_mask_leave(struct snd_mask *mask, unsigned int val)
{
	unsigned int v;
	v = mask->bits[MASK_OFS(val)] & MASK_BIT(val);
	unsigned int v, bits_index;

	bits_index = MASK_OFS(val);
	if (bits_index < ((SNDRV_MASK_MAX+31)/32)) {
		v = mask->bits[bits_index] & MASK_BIT(val);
		snd_mask_none(mask);
	mask->bits[MASK_OFS(val)] = v;
		mask->bits[bits_index] = v;
	}
}

static inline void snd_mask_intersect(struct snd_mask *mask,