2005-07-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* prefix.c: (ip_masklen) While loop should test that 'pnt' pointer is
	  in range before dereferencing it.

	[backport candidate]
This commit is contained in:
ajs 2005-07-26 14:35:37 +00:00
parent c898775c95
commit 330009f7b3
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-07-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* prefix.c: (ip_masklen) While loop should test that 'pnt' pointer is
in range before dereferencing it.
2005-06-24 Pawel Worach <pawel.worach@gmail.com>
* getopt.h: add further tests for full getopt declaration on

View File

@ -292,7 +292,7 @@ ip_masklen (struct in_addr netmask)
pnt = (u_char *) &netmask;
end = pnt + 4;
while ((*pnt == 0xff) && pnt < end)
while ((pnt < end) && (*pnt == 0xff))
{
len+= 8;
pnt++;