9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] bug in v4parseip?
@ 2003-02-13  9:38 Saroj Mahapatra
  2003-02-13 15:21 ` David Presotto
  0 siblings, 1 reply; 6+ messages in thread
From: Saroj Mahapatra @ 2003-02-13  9:38 UTC (permalink / raw)
  To: 9fans

v4parseip function code in libip/ipparse.c looks suspicious. First of
all, I don't know why it bothers about class A or B given the trend
towards classless addresses? Next, if it is trying to handle inputs of
the form: a.b.c and a.b, then the problem is that c in the first case
can be a 24-bit integer and b in the second case can be a 16-bit
integer; the code assigns those parts to a 'uchar' resulting in
truncation. Or, did I misunderstand the code?


Thank you,
Saroj Mahapatra


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-02-13 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-13  9:38 [9fans] bug in v4parseip? Saroj Mahapatra
2003-02-13 15:21 ` David Presotto
2003-02-13 15:55   ` Lucio De Re
2003-02-13 16:12     ` David Presotto
2003-02-13 16:17       ` Boyd Roberts
2003-02-13 16:29       ` Lucio De Re

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).