From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Saroj Mahapatra Message-ID: <6d3220b4.0302121654.66a0f55e@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: [9fans] bug in v4parseip? Date: Thu, 13 Feb 2003 09:38:08 +0000 Topicbox-Message-UUID: 5b1f63f8-eacb-11e9-9e20-41e7f4b1d025 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