浏览代码

qcacmn: Fix inappropriate use of qdf_str_lcopy()

A call into qdf_str_lcopy() is passing qdf_str_len(src) as the
destination buffer size parameter. Instead, pass the actual size
of the destination buffer.

Change-Id: I62ff473d9d45cfa53c5fc3df27743690586381c0
CRs-Fixed: 2196114
Dustin Brown 7 年之前
父节点
当前提交
26e61b5928
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      qdf/linux/src/qdf_trace.c

+ 1 - 1
qdf/linux/src/qdf_trace.c

@@ -2366,7 +2366,7 @@ int qdf_print_ctrl_register(const struct category_info *cinfo,
 
 	if (pctrl_name) {
 		qdf_str_lcopy(print_ctrl_obj[idx].name, pctrl_name,
-			      qdf_str_len(pctrl_name) + 1);
+			      sizeof(print_ctrl_obj[idx].name));
 	}
 
 	if (custom_print_handler)