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

Commit 5e99e425 authored by Meng Wang's avatar Meng Wang Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: q6dspv2: fix potentional information leak



The heap buffer pointed to out_buffer and in_buffer are allocated
but uninitlalized. It may cause information leak.
Change to kzalloc instead of kmalloc when allocating kernel buffers
to avoid information leak.

CRs-Fixed: 1087020f
Change-Id: I6f9b7a630158355a7f920dcf9cfffe537b1c6a85
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent fcbbe260
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -317,12 +317,12 @@ static void config_debug_fs_write(struct audio_buffer *ab)
}
static void config_debug_fs_init(void)
{
	out_buffer = kmalloc(OUT_BUFFER_SIZE, GFP_KERNEL);
	out_buffer = kzalloc(OUT_BUFFER_SIZE, GFP_KERNEL);
	if (out_buffer == NULL) {
		pr_err("%s: kmalloc() for out_buffer failed\n", __func__);
		goto outbuf_fail;
	}
	in_buffer = kmalloc(IN_BUFFER_SIZE, GFP_KERNEL);
	in_buffer = kzalloc(IN_BUFFER_SIZE, GFP_KERNEL);
	if (in_buffer == NULL) {
		pr_err("%s: kmalloc() for in_buffer failed\n", __func__);
		goto inbuf_fail;