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

Fix "_hexdump buffer size too small (114)" which has been spoiling hexdumps #1154

Merged
merged 3 commits into from
Jun 27, 2024

Conversation

Jalle19
Copy link
Collaborator

@Jalle19 Jalle19 commented Jun 27, 2024

Fixes this:

[26/06 23:35:00.478 AD4]: _hexdump buffer size too small (114)
Message repeated 6 times

The problem was that the allocated length for the buffer was based solely on the length of the input string, not taking into account that a single character of input can require a whole line of hexdump output if it spills over to a new line.

Since the side effect of the function is that the buffer gets logged it's hard to test without more refactoring. This sufficed for now.
…xdumps

[26/06 23:35:00.478 AD4]: _hexdump buffer size too small (114)
Message repeated 6 times

The problem was that the allocated length for the buffer was based solely on the length of the input string, not taking into account that a single character of input can require a whole line of hexdump output if it spills over to a new line.
@Jalle19 Jalle19 requested a review from catalinii June 27, 2024 06:36
@Jalle19 Jalle19 merged commit 25dbfb8 into catalinii:master Jun 27, 2024
10 checks passed
@Jalle19 Jalle19 deleted the fix-hexdump branch June 27, 2024 07:09
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.

None yet

2 participants