From ecbf61e7357d5c7047c813edd6983902d158688c Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 23 Mar 2009 10:37:57 +0000 Subject: [PATCH] [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: Alan Cox --- drivers/scsi/arm/cumana_2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index 68a64123af8..ed502b7412d 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c @@ -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; -- 2.41.1