From a5371a899547dee1cfa6b48a86d9d4b4909f6cde Mon Sep 17 00:00:00 2001 From: Sriharsha Allenki Date: Thu, 14 Feb 2019 12:03:25 +0530 Subject: [PATCH] usb: gsi: Initialize 'info' with zero Initialize the local variable 'info' with zero to prevent un-initialized access. Since the buffer is copied to user as well, this will prevent the exposure of data in the un-initialized buffer. Change-Id: Ia63d15cd90411934e7c4eb4130da0c5e7f2db706 Signed-off-by: Sriharsha Allenki --- drivers/usb/gadget/function/f_gsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c index ed45212fc218..7bbbad2e38a2 100644 --- a/drivers/usb/gadget/function/f_gsi.c +++ b/drivers/usb/gadget/function/f_gsi.c @@ -1480,7 +1480,7 @@ static long gsi_ctrl_dev_ioctl(struct file *fp, unsigned int cmd, struct gsi_ctrl_port *c_port; struct f_gsi *gsi; struct gsi_ctrl_pkt *cpkt; - struct ep_info info; + struct ep_info info = { {0}, {0} }; struct data_buf_info data_info = {0}; enum ipa_usb_teth_prot prot_id = *(enum ipa_usb_teth_prot *)(fp->private_data);