prevent termination during key write

This commit is contained in:
cathugger
2018-07-12 12:35:39 +00:00
parent 91f484cbc7
commit 8f1e08973d
2 changed files with 18 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ char *base64_to(char *dst,const u8 *src,size_t slen);
#define BASE64_TO_LEN(l) (((l + 3 - 1) / 3) * 4)
// converts src string from base64
size_t base64_from(u8 *dst,const char *src,size_t slen);
// calculates length needed to store data converted from base
// calculates length needed to store data converted from base64
#define BASE64_FROM_LEN(l) ((l) / 4 * 3)
// validates base32 string and optionally stores length of valid data
// returns 1 if whole string is good, 0 if string contains invalid data