diff --git a/lib/webfuse/adapter/impl/operation/read.c b/lib/webfuse/adapter/impl/operation/read.c index 11eb0f2..f30902b 100644 --- a/lib/webfuse/adapter/impl/operation/read.c +++ b/lib/webfuse/adapter/impl/operation/read.c @@ -17,7 +17,7 @@ static char * wf_impl_fill_buffer( wf_status * status) { *status = WF_GOOD; - char * buffer = malloc(count + 1); + char * buffer = malloc(count + 4); // FixMe: lws 3.2.0 needs more buffer to decode (bug?) if ((NULL != buffer) && (0 < count)) { @@ -27,7 +27,7 @@ static char * wf_impl_fill_buffer( } else if (0 == strcmp("base64", format)) { - lws_b64_decode_string(data, buffer, count + 1); + lws_b64_decode_string(data, buffer, count + 4); } else {