diff --git a/src/hlua.c b/src/hlua.c index 6e56583df..c66849c48 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -8069,6 +8069,11 @@ struct http_hdr *hlua_httpclient_table_to_hdrs(lua_State *L) goto next_value; } + if (hdr_num >= global.tune.max_http_hdr) { + lua_pop(L, 2); + goto skip_headers; + } + v = lua_tolstring(L, -1, &vlen); value = ist2(v, vlen); name = ist2(n, nlen);