aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
Diffstat (limited to 'etc.c')
-rw-r--r--etc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc.c b/etc.c
index 2870caf..bc72005 100644
--- a/etc.c
+++ b/etc.c
@@ -2016,6 +2016,10 @@ base64_encode(const unsigned char *src, size_t len)
unsigned long j;
size_t k;
+
+ if (!len)
+ return NULL;
+
k = len;
if (k % 3)
k += 3 - (k % 3);