aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-02-18 16:23:42 +0000
committerbptato <nincsnevem662@gmail.com>2021-02-18 16:23:42 +0000
commitde26f6156c2511df39981e2269672294e585ef8a (patch)
treeda65af0e6e59afc9f0d6177df2e4ba519071e0c6 /etc.c
parentUpdate ChangeLog (diff)
downloadw3m-de26f6156c2511df39981e2269672294e585ef8a.tar.gz
w3m-de26f6156c2511df39981e2269672294e585ef8a.zip
Handle iTerm2 images more efficiently
Diffstat (limited to 'etc.c')
-rw-r--r--etc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc.c b/etc.c
index 4e662e4..2870caf 100644
--- a/etc.c
+++ b/etc.c
@@ -2013,7 +2013,7 @@ base64_encode(const unsigned char *src, size_t len)
{
unsigned char *w, *at;
const unsigned char *in, *endw;
- int j;
+ unsigned long j;
size_t k;
k = len;
@@ -2024,7 +2024,9 @@ base64_encode(const unsigned char *src, size_t len)
if (k + 1 < len)
return NULL;
- w = GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(k + 1);
+ w = GC_MALLOC_ATOMIC(k + 1);
+ if (!w)
+ return NULL;
w[k] = 0;
at = w;