浏览代码

Merge "msm: camera: sync: Prevent OOB access of sync name" into camera-kernel.lnx.5.0

Camera Software Integration 3 年之前
父节点
当前提交
3bc1aac82e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/cam_sync/cam_sync.c

+ 1 - 0
drivers/cam_sync/cam_sync.c

@@ -488,6 +488,7 @@ static int cam_sync_handle_create(struct cam_private_ioctl_arg *k_ioctl)
 		u64_to_user_ptr(k_ioctl->ioctl_ptr),
 		k_ioctl->size))
 		return -EFAULT;
+	sync_create.name[SYNC_DEBUG_NAME_LEN] = '\0';
 
 	result = cam_sync_create(&sync_create.sync_obj,
 		sync_create.name);