Re: [Etherboot-developers] Uninitialized 'iplen' in nic.c
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2003-05-02 13:10:46
|
"Robb Main" <ma...@ac...> writes: > Attached patch against etherboot-5.1.8 corrects a coding issue in > await_reply() that could (in a bizarre set of circumstances) use the > variable 'iplen' without it being initialized. I doubt this would ever occur > in practice, but.... > I submit the attached patch for cleanliness. -EINVAL. please use diff -u next time. It is a whole lot more readable. I have a big problem with the patch. It does exactly the opposite of what it is supposed to do. It adds a case where iplen will be used initialized. In particular you take out the surrounding test for ip. You cannot have a udp unless it is also an ip packet. But you can sure have a packet that is not a ip packet. And that makes me worry a lot about: > BTW - I have commence hacking NIC.C into pieces (slicing down protocol > lines). So far, I have created: > - dhcp.c > - ip.c > - mcast.c > - rarp.c > - tftp.c > - udp.c > , and have retained the balance of (appropriate) code in 'nic.c'. Is this just code motion or is more involved. We are approaching a stable release, and I just don't want to see things break at this late stage in the game. Eric |