Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/base64.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-14 20:39:43 -0500
committerDan McGee <dan@archlinux.org>2011-08-15 06:24:49 -0500
commit83f076d3a81e5a625c07fdaf82a5e598a1c75c71 (patch)
tree26fbabfa4dc21d8c12e318a54826b8a98b12def6 /lib/libalpm/base64.h
parent835365b817285abf136fc8509ae9d1bf97f55dff (diff)
Update base64 PolarSSL code
Also adjust our code using it for the size_t adjustments made by upstream. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/base64.h')
-rw-r--r--lib/libalpm/base64.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/libalpm/base64.h b/lib/libalpm/base64.h
index 0ae9612c..406aefa1 100644
--- a/lib/libalpm/base64.h
+++ b/lib/libalpm/base64.h
@@ -25,8 +25,10 @@
#ifndef _BASE64_H
#define _BASE64_H
-#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL 0x0010
-#define POLARSSL_ERR_BASE64_INVALID_CHARACTER 0x0012
+#include <string.h>
+
+#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL -0x0010 /**< Output buffer too small. */
+#define POLARSSL_ERR_BASE64_INVALID_CHARACTER -0x0012 /**< Invalid character in input. */
/**
* \brief Encode a buffer into base64 format
@@ -43,8 +45,8 @@
* \note Call this function with *dlen = 0 to obtain the
* required buffer size in *dlen
*/
-int base64_encode( unsigned char *dst, int *dlen,
- const unsigned char *src, int slen );
+int base64_encode( unsigned char *dst, size_t *dlen,
+ const unsigned char *src, size_t slen );
/**
* \brief Decode a base64-formatted buffer
@@ -62,7 +64,7 @@ int base64_encode( unsigned char *dst, int *dlen,
* \note Call this function with *dlen = 0 to obtain the
* required buffer size in *dlen
*/
-int base64_decode( unsigned char *dst, int *dlen,
- const unsigned char *src, int slen );
+int base64_decode( unsigned char *dst, size_t *dlen,
+ const unsigned char *src, size_t slen );
#endif /* base64.h */