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

Commit 7e4d8780 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dsi-staging: Add range check in debugfs_dump_info_read"

parents 79a8f215 5e073ffd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2019, 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
@@ -98,6 +98,9 @@ static ssize_t debugfs_dump_info_read(struct file *file,
			"\tClock master = %s\n",
			display->ctrl[display->clk_master_idx].ctrl->name);

	if (len > count)
		len = count;

	if (copy_to_user(buff, buf, len)) {
		kfree(buf);
		return -EFAULT;