|
|
@ -22,6 +22,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <sxt/base64.h>
|
|
|
|
#include <sxt/base64.h>
|
|
|
@ -80,7 +81,7 @@ size_t sxt_b64encode_in(const char *data, char *bdata, size_t data_len)
|
|
|
|
nil = (c + 3) - data_len;
|
|
|
|
nil = (c + 3) - data_len;
|
|
|
|
len = 0;
|
|
|
|
len = 0;
|
|
|
|
for(i = 0; i < 3; i++) {
|
|
|
|
for(i = 0; i < 3; i++) {
|
|
|
|
if(i < nil) {
|
|
|
|
if(i < nil + 1) {
|
|
|
|
ib[i] = *((unsigned char *)data + (c + i));
|
|
|
|
ib[i] = *((unsigned char *)data + (c + i));
|
|
|
|
len++;
|
|
|
|
len++;
|
|
|
|
} else ib[i] = (unsigned char)0;
|
|
|
|
} else ib[i] = (unsigned char)0;
|
|
|
|