Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/ic
On Sep 4, 4:10am, tsutsui%ceres.dti.ne.jp@localhost (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/sys/dev/ic
| > | Isn't it better to make sc_dleft signed?
| > | (maybe this code should be wrapped by #ifdef DIAGNOSTIC anyway)
| >
| > I think that keeping things unsigned makes the code simpler. Having
| > the checks always in the kernel prevents buffer overflows and crashes.
|
| But you #if 0'ed out a check ("data xfered more than requested bytes")
| which didn't work as intended because sc_dleft was unsigned.
Yes, either the driver broke when sc_dleft was changed to unsigned or
the test is unnecessary, and we need to add more tests to check that
sc_dleft does not exceed the number of bytes in the request.
christos
Home |
Main Index |
Thread Index |
Old Index