Nmap Development mailing list archives

Re: [PATCH] Rewrite strcasestr()


From: Fyodor <fyodor () insecure org>
Date: Sun, 5 Mar 2006 20:11:12 -0800

On Thu, Mar 02, 2006 at 08:08:22PM -0600, Kris Katterjohn wrote:
The attached patch simplifies strcasestr() in nbase/nbase_str.c to be similar
to our str[n]casecmp() functions.

-rwxr-xr-x  1 kjak root 1964705 2006-03-02 19:46 nmap*
-rwxr-xr-x  1 kjak root 1964985 2006-03-02 19:38 nmap.orig*


The new one may be 180 bytes smaller and easier to read, but I think
the original would be much faster.  It doesn't need to do two memory
allocations and de-allocations for each call.

Cheers,
-F


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: