kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 2bf43fe5f800a75d4cf7050ddcc53c46b487e4e9
parent be4b1c7e7be915bb6cd68e24b7e2574d897a5500
Author: Joris Vink <joris@coders.se>
Date:   Thu,  3 Jul 2014 20:10:55 +0200

Unfuck boundary snprintf check, broke multipart forms

Diffstat:
src/http.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/http.c b/src/http.c @@ -720,7 +720,7 @@ http_populate_multipart_form(struct http_request *req, int *v) slen = strlen(val); boundary = kore_malloc(slen + 3); l = snprintf(boundary, slen + 3, "--%s", val); - if (l == -1 || (size_t)l >= sizeof(boundary)) { + if (l == -1) { kore_mem_free(boundary); kore_mem_free(type); return (KORE_RESULT_ERROR);