Propose a constant buffer size #95
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not sure if getting the buffer length precisely correct is crucial for this routine (untested), but I notice the buffer is almost always either size 44-45 so why not just pick one & make things easier?
Came across this because the code fails to compile under the
-Wvlacompiler option. That should be disabled here TBH -- the concern there is getting a stack overflow if the buffer request winds up inordinately large. But in this case the buffer size is very small --> unlikely to cause issues except under extreme memory pressure.But anyway, we can make things easier on the compiler/etc if we have a constant here which I think should be possible.
To be clear: PR is a suggestion, so feel free to close.