[PATCH] wininet: Return failure when adding HTTP header with empty value.
Jacek Caban
jacek at codeweavers.com
Fri May 20 09:46:17 CDT 2022
Hi Ziqing,
On 5/16/22 06:27, Ziqing Hui wrote:
> Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
> ---
> dlls/wininet/http.c | 6 ++++++
> dlls/wininet/tests/http.c | 3 ---
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
> index 55698467cda..f6680790986 100644
> --- a/dlls/wininet/http.c
> +++ b/dlls/wininet/http.c
> @@ -6139,6 +6139,12 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
> {
> HTTPHEADERW hdr;
>
> + if (!value[0])
> + {
> + LeaveCriticalSection(&request->headers_section);
> + return ERROR_INVALID_PARAMETER;
> + }
I think we could reject such headers even earlier, like in
HTTP_InterpretHttpHeader.
Thanks,
Jacek
More information about the wine-devel
mailing list