mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-05-04 12:24:45 +00:00
prevent possible buffer overflow
This commit is contained in:
parent
8f1e08973d
commit
cf5ac5f929
2 changed files with 13 additions and 9 deletions
2
base64.h
2
base64.h
|
@ -9,3 +9,5 @@ size_t base64_from(u8 *dst,const char *src,size_t slen);
|
|||
// validates base32 string and optionally stores length of valid data
|
||||
// returns 1 if whole string is good, 0 if string contains invalid data
|
||||
int base64_valid(const char *src,size_t *count);
|
||||
// aligns data length to something base64 can represent without padding
|
||||
#define BASE64_DATA_ALIGN(l) (((l + 2) / 3) * 3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue