Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug 1781 #1796

Closed
wants to merge 1 commit into from

Conversation

@kc0bfv
Copy link

kc0bfv commented Oct 25, 2019

This seemed to fix bug #1781 for me. table.unpack on self.headers was returning "nil", and causing the error described in that bug. This addition detects that state in a similar way as the code prior to the most recent commit to this file. The most recent commit to this file seems to have introduced this bug.

This seemed to fix bug #1781 for me.  table.unpack on self.headers was returning "nil", and causing the error described in that bug.  This addition detects that state in a similar way as the code prior to the most recent commit to this file.  The most recent commit to this file seems to have introduced this bug.
@nnposter nnposter self-assigned this Nov 6, 2019
@nnposter nnposter added bug NSE labels Nov 6, 2019
Copy link

nnposter left a comment

The use of table.unpack() here is flawed in the first place. Consider the following code:

self = {headers = {"ccc", "ddd"}}
req = {"aaa", table.unpack(self.headers), "bbb"}

The desired outcome is that req is now

{"aaa", "ccc", "ddd", "bbb"}

while in reality the result is

{"aaa", "ccc", "bbb"}

The reason is that nested sequences do not get flattened out. Instead only the first element of the child sequence (or nil) is merged into the parent sequence.

@nnposter

This comment has been minimized.

Copy link

nnposter commented Nov 6, 2019

The issue has been hopefully rectified in r37751. Please report back if the error persists.

@nmap-bot nmap-bot closed this in 08a6d8d Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.