From f137a0784791733e2d38b32eafd6ede22544bba2 Mon Sep 17 00:00:00 2001 From: patrik Date: Fri, 2 Apr 2010 17:58:32 +0000 Subject: [PATCH] o [NSE] Fixed bug in rpc.lua library that incorrectly required file handles to be 32 octects when calling the ReadDir function. The bug was reported by Djalal Harouni. [Patrik] --- CHANGELOG | 4 ++++ nselib/rpc.lua | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 95783f5fe..b147eea09 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ # Nmap Changelog ($Id$); -*-text-*- +o [NSE] Fixed bug in rpc.lua library that incorrectly required file handles + to be 32 octects when calling the ReadDir function. The bug was reported by + Djalal Harouni. [Patrik] + o Removed --interactive mode, a miniature shell whose primary purpose was to hide command line arguments from the process list. It had been broken (would segfault during the second scan) since before May diff --git a/nselib/rpc.lua b/nselib/rpc.lua index 395ed9d6f..fdafdb3d7 100644 --- a/nselib/rpc.lua +++ b/nselib/rpc.lua @@ -836,8 +836,8 @@ NFS = { local pos, data, _ = 1, "", "" local header, response = {}, {} - if not file_handle or file_handle:len() ~= 32 then - return false, "Incorrect filehandle received" + if ( not(file_handle) ) then + return false, "No filehandle received" end if ( self.version == 3 ) then @@ -882,7 +882,7 @@ NFS = { return false, ("Version %d not supported"):format(self.version) end - if not file_handle or file_handle:len() ~= 32 then + if ( not(file_handle) or file_handle:len() ~= 32 ) then return false, "Incorrect filehandle received" end