From 03d6fc9201e2cd30735e1e3f97a99679df25aa47 Mon Sep 17 00:00:00 2001 From: nnposter Date: Tue, 4 Aug 2020 02:16:17 +0000 Subject: [PATCH] Clarified parsing of the volume list in AFP FPGetSrvrParms --- nselib/afp.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nselib/afp.lua b/nselib/afp.lua index 013f52985..90cd8b630 100644 --- a/nselib/afp.lua +++ b/nselib/afp.lua @@ -830,16 +830,12 @@ Proto = { data = response:getPacketData() parms.server_time, parms.vol_count, pos = string.unpack(">I4B", data) - -- we should now be at the leading zero preceding the first volume name - -- next is the length of the volume name, move pos there - pos = pos + 1 - parms.volumes = {} for i=1, parms.vol_count do local volume_name - volume_name, pos = string.unpack("s1", data, pos) - pos = pos + 1 + -- pos+1 to skip over the volume bitmap + volume_name, pos = string.unpack("s1", data, pos + 1) table.insert(parms.volumes, string.format("%s", volume_name) ) end