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

Added methods to help decode NDR64 #74

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

Conversation

hackett92
Copy link

Finished a project where I needed to decode NDR data with x64 bit pointer sizes. Most of the alignment issues could be fixed by consuming irrelevant data from the stream, however, peeking at the data makes things much more efficient and reliable, which explains the PeekBuffer method. This method reads the given length from the stream and puts the position back to where it was.

Another issue was when reading and aligning 64bit data, the size of a property within a struct was put on the _conformancevalues array, but was never read and removed from the stack afterwards. This caused issues when putting new items on the stack, since it performs a check if the stack is empty or not, skipping adding routine if the stack is not empty.

Added two methods:

  • Return the _conformance_values array
  • Clear the _conformance_values array

Copy link

google-cla bot commented Jan 15, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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