From 2722b1e28222a283f9f5235c34fb616fd25e2694 Mon Sep 17 00:00:00 2001 From: Robin Malley Date: Tue, 19 May 2020 14:04:39 -0400 Subject: [PATCH] Allow uploaded files to have embedded nulls Minor bugfix that correctly passes uploaded files to the lua runtime when they have embedded nulls. --- src/libkore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libkore.c b/src/libkore.c index 82966ad..396675d 100644 --- a/src/libkore.c +++ b/src/libkore.c @@ -251,7 +251,7 @@ lhttp_file_get(lua_State *L){ lua_error(L); } s[f->length] = '\0'; - lua_pushstring(L,s); + lua_pushlstring(L,s,read); return 1; }