Nmap Development mailing list archives

Re: [PATCH] Use htons() instead of bitwise ops in idle_scan.cc


From: Fyodor <fyodor () insecure org>
Date: Tue, 22 Aug 2006 01:06:53 -0700

On Mon, Aug 21, 2006 at 10:06:27PM -0500, Kris Katterjohn wrote:
   if (seqclass == IPID_SEQ_BROKEN_INCR) {
     /* Convert to network byte order */
-    startid = (startid >> 8) + ((startid & 0xFF) << 8);
-    endid = (endid >> 8) + ((endid & 0xFF) << 8);
+    startid = htons(startid);
+    endid = htons(endid);

Thanks, applied.

-F

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


Current thread: