Signal errors with return codes?
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 172
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 1
Description
While decompressing via JBlosc, I was hitting [a `-1` return value from because my "dest" buffer wasn't big enough](https://github.com/Blosc/c-blosc/blob/a60e30bf371b50dff22a50e224e95752ee41dfb5/blosc/blosc.c#L1446).
I'm responding to all `-1`s by exponentially increasing my buffer size until I hit 2GB-1, at which point I assume continued failure means the data is corrupt, but it would be nice to differentiate these cases via the return value.
Contributor guide
Research direction
Read blosc/blosc.c around line 1446 and the issue's decompression scenario. Clarify the return-code contract for an undersized dest buffer versus corrupt data, then add focused coverage showing both cases are distinguishable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100