Got SIGABRT when b64decode to a preallocated buffer #70
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
need more info
need verification for fix
not so hard
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-tplgy/cppcodec#70
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm trying to decode a string, which is a b64encoded 64-byte signature, to a preallocated buffer.
Since its length is known exactly, it might not be a good practice to allocate a buffer bigger than that.
But the
decoded_max_sizerequires 2 more bytes.Is it possible to give a more precise calculation on the length of output?
If not, what about throw a concise exception?
Here's my comiler