Allow uploaded files to have embedded nulls

Minor bugfix that correctly passes uploaded files to the lua runtime
when they have embedded nulls.
This commit is contained in:
Robin Malley 2020-05-19 14:04:39 -04:00
parent a5293ae7a6
commit 2722b1e282
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ lhttp_file_get(lua_State *L){
lua_error(L); lua_error(L);
} }
s[f->length] = '\0'; s[f->length] = '\0';
lua_pushstring(L,s); lua_pushlstring(L,s,read);
return 1; return 1;
} }