瀏覽代碼

qcacmn: Use vzalloc instead of vmalloc

Currently driver is using vmalloc to allocate the memory
inside dbglog_block_read api and this buffer is copied to
userspace buffer which may lead to use of uninitialized
buffer.

To avoid above issue use vzalloc to allocated the buffer
which initializes the memory to zero.

Change-Id: Iebc530b000c908231ef8718e79054801d294dd8f
CRs-Fixed: 2470385
Ashish Kumar Dhanotiya 6 年之前
父節點
當前提交
bf9d06fab1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      utils/fwlog/dbglog_host.c

+ 1 - 1
utils/fwlog/dbglog_host.c

@@ -4060,7 +4060,7 @@ static ssize_t dbglog_block_read(struct file *file,
 	char *buf;
 	int ret;
 
-	buf = vmalloc(count);
+	buf = vzalloc(count);
 	if (!buf)
 		return -ENOMEM;