aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-02-18 18:18:06 +0000
committerbptato <nincsnevem662@gmail.com>2021-02-18 18:18:06 +0000
commit3304675affd22e9ede2c92b5c0085961a797485e (patch)
treef476160aca8d8700798d5ec97b33339d2514f025 /etc.c
parentHandle iTerm2 images more efficiently (diff)
downloadw3m-3304675affd22e9ede2c92b5c0085961a797485e.tar.gz
w3m-3304675affd22e9ede2c92b5c0085961a797485e.zip
Support kitty image protocol
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);