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

Commit 3668b903 authored by Tejas Prajapati's avatar Tejas Prajapati Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: sync: initialize event variable with zero



v4l2_event is a stack buffer, which is not initialized.
This leaves some random byte in it which is kernel sensitive.
By initializing the struct variable with zero removes
vulnerability.

Change-Id: Ib8153a041cd3ad039f35cd27f2e567107f9a7de2
Signed-off-by: default avatarTejas Prajapati <tpraja@codeaurora.org>
parent 29bc33c7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -368,7 +368,7 @@ void cam_sync_util_send_v4l2_event(uint32_t id,
	void *payload,
	int len)
{
	struct v4l2_event event;
	struct v4l2_event event = {0};
	__u64 *payload_data = NULL;
	struct cam_sync_ev_header *ev_header = NULL;