Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sys/dev/scsipi/scsipi_base.c




To: current-users%NetBSD.org@localhost

Subject: Re: sys/dev/scsipi/scsipi_base.c

From: jnemeth%victoria.tc.ca@localhost (John Nemeth)

Date: Sun, 6 Jan 2008 03:11:42 -0800


On May 29,  5:30am, David Laight wrote:
} On Sun, Jan 06, 2008 at 03:41:49AM -0700, John R. Shannon wrote:
} > Line 1124 has:
} > 
} > memcpy(inqbuf->vendor, "ADAPTEC ACB-4000            ", 28);
} > 
} > and line 1144 has:
} > 
} > memcpy(inqbuf->vendor, "EMULEX  MT-02 QIC           ", 28);
} > 
} > yet inqbuf->vendor is declared in struct scsipi_inquiry_data as:
} > 
} > char    vendor[8];
} 
} and is followed by:
}   char    product[16];
}   char    revision[4];
} so the memcpy updates all 3 fields :-)

     That is extremely grotty code!

}-- End of excerpt from David Laight



Follow-Ups:

Re: sys/dev/scsipi/scsipi_base.c
From: Adam Hamsik

Re: sys/dev/scsipi/scsipi_base.c
From: Paul Goyette




Prev by Date: Re: sys/dev/scsipi/scsipi_base.c

Next by Date: Re: sys/dev/scsipi/scsipi_base.c

Previous by Thread: Re: sys/dev/scsipi/scsipi_base.c

Next by Thread: Re: sys/dev/scsipi/scsipi_base.c

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index