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

dont alloc buf and make iovec in read-request parsing, insist on buffer in read-request encoding #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bdodge
Copy link
Contributor

@bdodge bdodge commented Jan 20, 2025

  • In processing read request pdu's I had allocated a reply data buffer and iovec for it so that when a reply is made, there is a buffer in the req already. This isn't really needed since the server application might want to own this buffer instead and encoding the reply makes its own iovec with the buffer passed in so the previous iovec isn't used, so I deleted both the alloc and iovec creation.
  • In generating a read request, I added an error if no buffer for the reply data is passed in. There was only one call to this function in libsmb2.c which does pass in a buffer.

@bdodge bdodge changed the title dont make iovec read-request parsing, and insist on buffer in read-reply encoding dont alloc buf and make iovec in read-request parsing, insist on buffer in read-request encoding Jan 20, 2025
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