[PATCH 2/4] mshtml: Handle empty status text when processing the response.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Thu May 26 11:54:27 CDT 2022
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
The HTTP response header status text can be empty and without any space
before it at all (we have tests in wininet/http for this, although this
isn't used for them, but having behavior match is sensible).
dlls/mshtml/navigate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index e750ff2..d5ec368 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -1690,8 +1690,9 @@ static HRESULT process_response_status_text(const WCHAR *header, const WCHAR *he
return E_FAIL;
header = wcschr(header + 1, ' ');
if(!header || header >= header_end)
- return E_FAIL;
- ++header;
+ header = header_end;
+ else
+ ++header;
*status_text = heap_strndupWtoU(header, header_end - header);
--
2.34.1
More information about the wine-devel
mailing list