Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: [PATCH] Fix NmapArpCache to actually grow beyond size 0
From: Fyodor <fyodor () insecure org>
Date: Mon, 14 Apr 2008 16:56:45 -0700

On Mon, Apr 14, 2008 at 06:12:40PM +0200, Daniel Roethlisberger wrote:
I've been looking at the NmapArpCache function in tcpip.cc; as far as I
can see the cache was always size 0 and was never able to grow.

The attached patch increments ArpCacheSz when adding a tuple to the
cache.  It also moves the realloc into the conditional block, since
there is only a need for reallocation if ArpCapacity is increased.

Thanks, I have applied your patch.  I'm not sure we even need
NmapArpCache, and if we do than this should probably be rewritten to
use STL to avoid the sort of bug you just discovered.  But for now, I
have applied your fix so that the feature should at least work.


Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]