From 1fb06929d9769077296a4e0464443fa755c3916b Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 19 Nov 2016 14:40:10 +0000 Subject: Remove internal BASE64 in favour of nsutils' one --- content/fetchers/data.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'content') diff --git a/content/fetchers/data.c b/content/fetchers/data.c index 65d99cf14..d82832a31 100644 --- a/content/fetchers/data.c +++ b/content/fetchers/data.c @@ -32,7 +32,7 @@ #include "utils/log.h" #include "utils/utils.h" #include "utils/ring.h" -#include "utils/base64.h" +#include "nsutils/base64.h" #include "content/fetch.h" #include "content/fetchers.h" @@ -202,8 +202,11 @@ static bool fetch_data_process(struct fetch_data_context *c) } if (c->base64) { - base64_decode_alloc(unescaped, unescaped_len, &c->data, &c->datalen); - if (c->data == NULL) { + if ((nsu_base64_decode_alloc((uint8_t *)unescaped, + unescaped_len, + (uint8_t **)&c->data, + &c->datalen) != NSUERROR_OK) || + (c->data == NULL)) { msg.type = FETCH_ERROR; msg.data.error = "Unable to Base64 decode data: URL"; fetch_data_send_callback(&msg, c); -- cgit v1.2.3