mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-05-31 20:02:14 +00:00
harden pseudo-YAML validation
This commit is contained in:
parent
ee0257dc88
commit
91f484cbc7
3 changed files with 7 additions and 4 deletions
2
base32.h
2
base32.h
|
@ -4,7 +4,7 @@ char *base32_to(char *dst,const u8 *src,size_t slen);
|
|||
#define BASE32_TO_LEN(l) (((l) * 8 + 4) / 5)
|
||||
// converts src string from base32
|
||||
size_t base32_from(u8 *dst,u8 *dmask,const char *src);
|
||||
// calculates length needed to store data converted from base
|
||||
// calculates length needed to store data converted from base32
|
||||
#define BASE32_FROM_LEN(l) (((l) * 5 + 7) / 8)
|
||||
// validates base32 string and optionally stores length of valid data
|
||||
// returns 1 if whole string is good, 0 if string contains invalid data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue