Rob Shearman : wininet: Fix an off-by-one error in the boundary checks in HTTP_DecodeBase64.
Alexandre Julliard
julliard at winehq.org
Sat Feb 16 09:57:26 CST 2008
Module: wine
Branch: master
Commit: f8f9dbbbe7de084fb9751abd4b523d357b605843
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f8f9dbbbe7de084fb9751abd4b523d357b605843
Author: Rob Shearman <rob at codeweavers.com>
Date: Fri Feb 15 10:06:32 2008 +0000
wininet: Fix an off-by-one error in the boundary checks in HTTP_DecodeBase64.
---
dlls/wininet/http.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 0245d2b..083eda6 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -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));
More information about the wine-cvs
mailing list