Commit f8f9dbbb authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

wininet: Fix an off-by-one error in the boundary checks in HTTP_DecodeBase64.

parent eb0a8692
......@@ -1129,9 +1129,9 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin )
{
signed char in[4];
if (base64[0] > ARRAYSIZE(HTTP_Base64Dec) ||
if (base64[0] >= ARRAYSIZE(HTTP_Base64Dec) ||
((in[0] = HTTP_Base64Dec[base64[0]]) == -1) ||
base64[1] > ARRAYSIZE(HTTP_Base64Dec) ||
base64[1] >= ARRAYSIZE(HTTP_Base64Dec) ||
((in[1] = HTTP_Base64Dec[base64[1]]) == -1))
{
WARN("invalid base64: %s\n", debugstr_w(base64));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment