wininet: Fix off by one error parsing RFC 850 dates

Juan Lang juan.lang at gmail.com
Mon Oct 24 15:22:37 CDT 2011


Oops.
--Juan
-------------- next part --------------
From 9d7180a6e746109fc86b78039f108a1906ba3d24 Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Mon, 24 Oct 2011 13:21:10 -0700
Subject: [PATCH 2/2] Fix off by one error parsing RFC 850 dates

---
 dlls/wininet/http.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index d1a870b..db85d0b 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -4292,7 +4292,7 @@ static BOOL HTTP_ParseRfc850Date(LPCWSTR value, FILETIME *ft)
             return FALSE;
         }
     }
-    else if (ptr - value <= sizeof(day) / sizeof(day[0]))
+    else if (ptr - value < sizeof(day) / sizeof(day[0]))
     {
         memcpy(day, value, (ptr - value) * sizeof(WCHAR));
         day[ptr - value + 1] = 0;
-- 
1.7.3.1


More information about the wine-patches mailing list