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

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

Merge "crypto: msm: check length before copying to buf in _debug_stats_read"

parents 8d3d0d03 a604e6f3
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -884,7 +884,7 @@ static ssize_t _debug_stats_read(struct file *file, char __user *buf,
	int len;
	int len;


	len = _disp_stats();
	len = _disp_stats();

	if (len <= count)
		rc = simple_read_from_buffer((void __user *) buf, len,
		rc = simple_read_from_buffer((void __user *) buf, len,
			ppos, (void *) _debug_read_buf, len);
			ppos, (void *) _debug_read_buf, len);


+2 −2
Original line number Original line Diff line number Diff line
@@ -1987,9 +1987,9 @@ static ssize_t _debug_stats_read(struct file *file, char __user *buf,


	len = _disp_stats(qcedev);
	len = _disp_stats(qcedev);


	if (len <= count)
		rc = simple_read_from_buffer((void __user *) buf, len,
		rc = simple_read_from_buffer((void __user *) buf, len,
			ppos, (void *) _debug_read_buf, len);
			ppos, (void *) _debug_read_buf, len);

	return rc;
	return rc;
}
}


+3 −3
Original line number Original line Diff line number Diff line
/* Qualcomm Crypto driver
/* Qualcomm Crypto driver
 *
 *
 * Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -5742,9 +5742,9 @@ static ssize_t _debug_stats_read(struct file *file, char __user *buf,


	len = _disp_stats(qcrypto);
	len = _disp_stats(qcrypto);


	if (len <= count)
		rc = simple_read_from_buffer((void __user *) buf, len,
		rc = simple_read_from_buffer((void __user *) buf, len,
			ppos, (void *) _debug_read_buf, len);
			ppos, (void *) _debug_read_buf, len);

	return rc;
	return rc;
}
}