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

smb: allow dynamic length fields of exact length #323

Merged
merged 1 commit into from Jul 26, 2021
Merged

smb: allow dynamic length fields of exact length #323

merged 1 commit into from Jul 26, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jul 26, 2021

In order for the following line,

r = bytes.NewBuffer(meta.ParentBuf[o : o+l])

to succeed, o+l need only be <= len(meta.ParentBuf), not <.

This causes fields of exactly correct length to fail to unmarshal. This would not prevent a scan from being successful, but it would stop the targetName and negotiateFlags fields from being populated due to the early exit.

@codyprime codyprime merged commit a1d5e93 into zmap:master Jul 26, 2021
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.

2 participants