diff options
author | Bhalchandra Gajare <gajare@codeaurora.org> | 2015-10-26 17:08:43 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:11:08 -0700 |
commit | e9c2d518bee63b4cca6c31b0d38faab4fcf9265f (patch) | |
tree | 4eaab97b54464f152b017cc6d6c538de6d4c8dc0 | |
parent | 5579f105aad0f2273764c3fd2b513011e4182992 (diff) |
ASoC: msm-compr: Fix possible array out of bounds
Add check to avoid possible array out of bounds in function
msm_compr_send_ddp_cfg.
CRs-fixed: 925138
Change-Id: If3915565bdea998404854bd73ff7dafb8a2b23b0
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
-rw-r--r-- | include/uapi/sound/compress_params.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index ecb05356d85c..d1f03d7214b3 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h @@ -53,6 +53,8 @@ #include <linux/types.h> +#define SND_DEC_DDP_MAX_PARAMS 18 + /* AUDIO CODECS SUPPORTED */ #define MAX_NUM_CODECS 32 #define MAX_NUM_CODEC_DESCRIPTORS 32 @@ -342,8 +344,8 @@ struct snd_enc_generic { struct snd_dec_ddp { __u32 params_length; - __u32 params_id[18]; - __u32 params_value[18]; + __u32 params_id[SND_DEC_DDP_MAX_PARAMS]; + __u32 params_value[SND_DEC_DDP_MAX_PARAMS]; } __attribute__((packed, aligned(4))); struct snd_dec_flac { |