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

Adjust ASSERTs to allow zero length LOB reads #348

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

nirosys
Copy link
Contributor

@nirosys nirosys commented Aug 1, 2024

Issue #, if available: #331

Description of changes:
This PR adjusts a couple ASSERTs in order to allow users to provide a buffer length of zero when reading LOB data.

Previously, if a user had a zero-length LOB in their data, they would need to test for zero length before reading the LOB data. Providing a zero length when reading a lob would result in an infinite loop in release builds due to this macro. This change allows the lob size to be used when reading, even if zero, potentially simplifying user code and definitely stopping surprise infinite loops.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@nirosys nirosys marked this pull request as ready for review August 1, 2024 20:23
@nirosys nirosys requested a review from tgregg August 5, 2024 19:28
@nirosys nirosys merged commit e0e9fcc into amazon-ion:master Aug 5, 2024
14 checks passed
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.

2 participants