Nmap Development mailing list archives

Re: Completed Lua 5.3 upgrade!


From: Patrick Donnelly <batrick () batbytes com>
Date: Sat, 18 Jun 2016 12:57:44 -0400

On Sat, Jun 18, 2016 at 11:48 AM, Daniel Miller <bonsaiviking () gmail com> wrote:
Patrick,

I found another anomaly, but I'm not sure the best way to fix it. It seems
that the previous bin.unpack() treated index 0 as equivalent to 1, meaning
the beginning of the string. The new one instead returns 1 for the next
index and nil for any unpacked values. So far, I've only identified
ssl-date.nse and tls-nextprotoneg.nse as being affected, since they pass 0
to tls.record_read, which gets used directly in a call to bin.unpack. I'm
fixing those in the current trunk, but there may be other odd places this
crops up as an off-by-one bug.

It's probably reasonable to just change the bin.unpack wrapper to
change init to 1 if <=0. That's the original behavior of the bin
unpack function. Sound good?

-- 
Patrick Donnelly
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: