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

Commit ecbf61e7 authored by Alan Cox's avatar Alan Cox Committed by Russell King
Browse files

[ARM] cumana: Fix a long standing bogon



Should be using strncmp as the data from user space may be unterminated

(Bug #8004)

Signed-off-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent dc85ce15
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
{
	int ret = length;

	if (length >= 11 && strcmp(buffer, "CUMANASCSI2") == 0) {
	if (length >= 11 && strncmp(buffer, "CUMANASCSI2", 11) == 0) {
		buffer += 11;
		length -= 11;