Skip to content

Conversation

@Will-W
Copy link

@Will-W Will-W commented Feb 4, 2015

The wrong value is being compared for the length.

It was working before because len was a large number (above 4) so never failed the check.

Command line lengths in the range 128-255 have the high bit set in the least significant byte (which is the most significant byte before the ntohl byte reversal is done). During the comparison that first bit is interpreted as a sign bit, so len is interpreted as negative and the check incorrectly fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant