* [PATCH] cumana: Fix a long standing bogon
@ 2009-03-23 10:37 Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2009-03-23 10:37 UTC (permalink / raw)
To: linux-scsi, rmk
Should be using strncmp as the data from user space may be unterminated
(Bug #8004)
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk
---
drivers/scsi/arm/cumana_2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index 68a6412..ed502b7 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] cumana: Fix a long standing bogon
@ 2009-03-26 20:53 Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2009-03-26 20:53 UTC (permalink / raw)
To: linux-kernel, linux-scsi
Should be using strncmp as the data from user space may be unterminated
(Bug #8004)
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk
---
drivers/scsi/arm/cumana_2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index 68a6412..ed502b7 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-26 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 20:53 [PATCH] cumana: Fix a long standing bogon Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2009-03-23 10:37 Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox