From 845bed4c2bc5e5dde1498c4faf1a89f85b2278bc Mon Sep 17 00:00:00 2001 From: nnposter Date: Sun, 8 Sep 2019 01:25:39 +0000 Subject: [PATCH] Avoid unintentional passing of insert position from string.unpack Fixes #1706 --- CHANGELOG | 3 +++ nselib/vnc.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 22e789239..d0730551c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,9 @@ o [Windows] Add support for the new loopback behavior in Npcap 0.9983. This Adapter to be installed, which was a source of problems for some users. [Daniel Miller] +o [NSE][GH#1706] VNC handshakes were failing with insert position out of bounds + error. [nnposter] + o [NSE][GH#1720] Function marshall_dom_sid2 in library msrpctypes was not correctly populating ID Authority. [nnposter] diff --git a/nselib/vnc.lua b/nselib/vnc.lua index d7d9fbbeb..8b7cbc4d9 100644 --- a/nselib/vnc.lua +++ b/nselib/vnc.lua @@ -248,7 +248,7 @@ VNC = { end for i=1, vncsec.count do - table.insert( vncsec.types, string.unpack("B", tmp, i) ) + table.insert( vncsec.types, (string.unpack("B", tmp, i)) ) end self.vncsec = vncsec end