Skip to content

fix null byte truncation in __place_input_wrapper#1503

Merged
xwings merged 2 commits into
qilingframework:devfrom
golem9247:patch-1
Nov 25, 2024
Merged

fix null byte truncation in __place_input_wrapper#1503
xwings merged 2 commits into
qilingframework:devfrom
golem9247:patch-1

Conversation

@golem9247
Copy link
Copy Markdown
Contributor

when using input_bytes.value, the input buffer will be truncated to the first null bytes encountered.

a initial seed such as : b"\x04\x08\x00\x66" will be b"\x04\x08"

Checklist

Which kind of PR do you create?

  • [X ] This PR only contains minor fixes.
  • This PR contains major feature update.
  • This PR introduces a new function/api for Qiling Framework.

Coding convention?

  • [X ] The new code conforms to Qiling Framework naming convention.
  • The imports are arranged properly.
  • Essential comments are added.
  • The reference of the new code is pointed out.

Extra tests?

  • No extra tests are needed for this PR.
  • I have added enough tests for this PR.
  • [X ] Tests will be added after some discussion and review.

Changelog?

  • [ ?] This PR doesn't need to update Changelog.
  • Changelog will be updated after some proper review.
  • Changelog has been updated in my PR.

Target branch?

  • [ X] The target branch is dev branch.

One last thing


when using input_bytes.value, the input buffer will be truncated to the first null bytes encountered.

a initial seed such as : b"\x04\x08\x00\x66" will be b"\x04\x08"
@elicn
Copy link
Copy Markdown
Member

elicn commented Oct 21, 2024

Good catch!
Though I believe input_bytes.raw would be faster as it doesn't involve copying the data over.

Ignore the failing tests, it is not related to your PR.

@golem9247
Copy link
Copy Markdown
Contributor Author

Good catch! Though I believe input_bytes.raw would be faster as it doesn't involve copying the data over.

Ignore the failing tests, it is not related to your PR.

yep didn't test input_bytes.raw but seem also working.

@xwings xwings merged commit 53318ba into qilingframework:dev Nov 25, 2024
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.

3 participants