Skip to content

Commit

Permalink
[ARM] cumana: Fix a long standing bogon
Browse files Browse the repository at this point in the history
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
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Alan Cox authored and Russell King committed Mar 24, 2009
1 parent dc85ce1 commit ecbf61e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/arm/cumana_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ecbf61e

Please sign in to comment.