ASoC: wcd_cpe_core: Fix buffer overflow in wcd_cpe_init
Clang warns:
../techpack/audio/asoc/codecs/wcd_cpe_core.c:1981:2: warning: 'snprintf'
size argument is too large; destination buffer has size 11, but size
argument is 13 [-Werror,-Wfortify-source]
snprintf(proc_name, (sizeof("cpe") + sizeof("_state") +
^
1 warning generated.
Fixes: 8e2277f79f ("audio-lnx: Initial change for techpack of audio
drivers.")
Change-Id: Ide9f1ba2b854ca854918f8ebfd22f8d24c12164b
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
This commit is contained in:
parent
581fe8ff77
commit
70eb2136c8
1 changed files with 2 additions and 2 deletions
|
|
@ -1978,8 +1978,8 @@ struct wcd_cpe_core *wcd_cpe_init(const char *img_fname,
|
|||
}
|
||||
|
||||
card = codec->component.card->snd_card;
|
||||
snprintf(proc_name, (sizeof("cpe") + sizeof("_state") +
|
||||
sizeof(id) - 2), "%s%d%s", cpe_name, id, state_name);
|
||||
snprintf(proc_name, sizeof(proc_name), "%s%d%s", cpe_name, id,
|
||||
state_name);
|
||||
entry = snd_info_create_card_entry(card, proc_name,
|
||||
card->proc_root);
|
||||
if (entry) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue