winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
839 discussions
Start a n
N
ew thread
Adam Petaccia : gdiplus: Stub GdipGetFontStyle.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: 6dc67fd0d01f9eb8514e53ca974748cc34ee613a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6dc67fd0d01f9eb8514e53ca9…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Wed Aug 27 17:21:39 2008 -0400 gdiplus: Stub GdipGetFontStyle. --- dlls/gdiplus/font.c | 7 +++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 6ed18ae..a38fb0b 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -295,6 +295,13 @@ GpStatus WINGDIPAPI GdipGetFontSize(GpFont *font, REAL *size) return Ok; } +GpStatus WINGDIPAPI GdipGetFontStyle(GpFont *font, INT *style) +{ + FIXME("stub: %p %p\n", font, style); + + return NotImplemented; +} + /******************************************************************************* * GdipGetFontUnit [GDIPLUS.@] * diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 3cf9544..3766dc1 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -270,7 +270,7 @@ @ stub GdipGetFontHeight @ stdcall GdipGetFontHeightGivenDPI(ptr long ptr) @ stdcall GdipGetFontSize(ptr ptr) -@ stub GdipGetFontStyle +@ stdcall GdipGetFontStyle(ptr ptr) @ stdcall GdipGetFontUnit(ptr ptr) @ stdcall GdipGetGenericFontFamilyMonospace(ptr) @ stdcall GdipGetGenericFontFamilySansSerif(ptr) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 37476d8..320f02d 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -437,6 +437,7 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); GpStatus WINGDIPAPI GdipGetFamily(GpFont*, GpFontFamily**); GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*); GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*); +GpStatus WINGDIPAPI GdipGetFontStyle(GpFont*, INT*); GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*); GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,
1
0
0
0
Adam Petaccia : gdiplus: Stub GdipGetFamily.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: cb39d787e41177c62f3ca3a8704eab6350e06a9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb39d787e41177c62f3ca3a87…
Author: Adam Petaccia <adam(a)tpetaccia.com> Date: Wed Aug 27 17:21:34 2008 -0400 gdiplus: Stub GdipGetFamily. --- dlls/gdiplus/font.c | 20 ++++++++++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 22 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 70f7bb0..6ed18ae 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -250,6 +250,26 @@ GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font) return GdipCreateFontFromLogfontW(hdc, &lfw, font); } +/******************************************************************************* + * GdipGetFamily [GDIPLUS.@] + * + * Returns the FontFamily for the specified Font + * + * PARAMS + * font [I] Font to request from + * family [O] Resulting FontFamily object + * + * RETURNS + * SUCCESS: Ok + * FAILURE: An element of GpStatus + */ +GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family) +{ + FIXME("stub: %p %p\n", font, family); + + return NotImplemented; +} + /****************************************************************************** * GdipGetFontSize [GDIPLUS.@] * diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index b45f917..3cf9544 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -263,7 +263,7 @@ @ stdcall GdipGetEmHeight(ptr long ptr) @ stub GdipGetEncoderParameterList @ stub GdipGetEncoderParameterListSize -@ stub GdipGetFamily +@ stdcall GdipGetFamily(ptr ptr) @ stdcall GdipGetFamilyName(ptr ptr long) @ stdcall GdipGetFontCollectionFamilyCount(ptr ptr) @ stdcall GdipGetFontCollectionFamilyList(ptr long ptr ptr) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index ec72087..37476d8 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -434,6 +434,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**) GpStatus WINGDIPAPI GdipDeleteFont(GpFont*); GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); +GpStatus WINGDIPAPI GdipGetFamily(GpFont*, GpFontFamily**); GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*); GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*); GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*);
1
0
0
0
Juan Lang : crypt32: Implement CTL decoding.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: ff0760dcd39adae42cfa8bd3dca460de1e099eed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff0760dcd39adae42cfa8bd3d…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Aug 27 14:15:57 2008 -0700 crypt32: Implement CTL decoding. --- dlls/crypt32/decode.c | 118 +++++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/tests/encode.c | 16 +----- 2 files changed, 121 insertions(+), 13 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ff0760dcd39adae42cfa8…
1
0
0
0
Juan Lang : crypt32: Implement encoding CTLs.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: a96361361d03601377fff8fe32b8c01523c3b5d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a96361361d03601377fff8fe3…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Aug 27 13:21:50 2008 -0700 crypt32: Implement encoding CTLs. --- dlls/crypt32/encode.c | 198 +++++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/tests/encode.c | 11 --- 2 files changed, 198 insertions(+), 11 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a96361361d03601377fff…
1
0
0
0
Juan Lang : crypt32: Add tests for encoding/decoding CTLs.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: 26d643d3e5adb747d4f2780452316415a1ac1dd1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26d643d3e5adb747d4f278045…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Aug 27 11:06:48 2008 -0700 crypt32: Add tests for encoding/decoding CTLs. --- dlls/crypt32/tests/encode.c | 531 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 531 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=26d643d3e5adb747d4f27…
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Use Unicode strings when updating listview.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: 4aabdecd67814991a1372dc05273bc680fe3cd65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4aabdecd67814991a1372dc05…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Wed Aug 27 20:40:31 2008 +0200 regedit: Use Unicode strings when updating listview. --- programs/regedit/childwnd.c | 5 ++- programs/regedit/framewnd.c | 32 +++++++++++++++------- programs/regedit/listview.c | 63 +++++++++++++++++++++++++++++------------- programs/regedit/main.h | 4 +- 4 files changed, 70 insertions(+), 34 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4aabdecd67814991a1372…
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Avoid conversion to ANSI when importing hex values.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: f7ff9e76f9b32759d8d1f79ce440762debfad4a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f7ff9e76f9b32759d8d1f79ce…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Wed Aug 27 23:29:08 2008 +0200 regedit: Avoid conversion to ANSI when importing hex values. --- programs/regedit/regproc.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index b65595e..eb724be 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -113,28 +113,28 @@ static BOOL convertHexToDWord(WCHAR* str, DWORD *dw) /****************************************************************************** * Converts a hex comma separated values list into a binary string. */ -static BYTE* convertHexCSVToHex(WCHAR *strW, DWORD *size) +static BYTE* convertHexCSVToHex(WCHAR *str, DWORD *size) { - char *s; + WCHAR *s; BYTE *d, *data; - char* strA = GetMultiByteString(strW); /* The worst case is 1 digit + 1 comma per byte */ - *size=(strlen(strA)+1)/2; + *size=(lstrlenW(str)+1)/2; data=HeapAlloc(GetProcessHeap(), 0, *size); CHECK_ENOUGH_MEMORY(data); - s = strA; + s = str; d = data; *size=0; while (*s != '\0') { UINT wc; - char *end; + WCHAR *end; - wc = strtoul(s,&end,16); + wc = strtoulW(s,&end,16); if (end == s || wc > 0xff || (*end && *end != ',')) { + char* strA = GetMultiByteString(s); fprintf(stderr,"%s: ERROR converting CSV hex stream. Invalid value at '%s'\n", - getAppName(), s); + getAppName(), strA); HeapFree(GetProcessHeap(), 0, data); HeapFree(GetProcessHeap(), 0, strA); return NULL; @@ -145,8 +145,6 @@ static BYTE* convertHexCSVToHex(WCHAR *strW, DWORD *size) s = end; } - HeapFree(GetProcessHeap(), 0, strA); - return data; }
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Fix concat handling for ANSI files.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: b058648ae3be6f4bb8cbace3ad63be2777b50b5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b058648ae3be6f4bb8cbace3a…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Mon Aug 25 23:38:53 2008 +0200 regedit: Fix concat handling for ANSI files. --- programs/regedit/regproc.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 8f05a2d..b65595e 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -666,13 +666,22 @@ void processRegLinesA(FILE *in) if (s_eol > line && *(s_eol-1) == '\\') { int c; s = s_eol-1; - /* The following error protection could be made more self- - * correcting but I thought it not worth trying. - */ - if ((c = fgetc (in)) == EOF || c != ' ' || - (c = fgetc (in)) == EOF || c != ' ') + + do + { + c = fgetc(in); + } while(c == ' ' || c == '\t'); + + if(c == EOF) + { fprintf(stderr,"%s: ERROR - invalid continuation.\n", getAppName()); + } + else + { + *s = c; + s++; + } continue; }
1
0
0
0
Lei Zhang : wininet: Remove redundant CrLf variables.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: f7e56d19c45f5b87bade0c4ecca3aa24d0264360 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f7e56d19c45f5b87bade0c4ec…
Author: Lei Zhang <thestig(a)google.com> Date: Wed Aug 27 17:03:13 2008 -0700 wininet: Remove redundant CrLf variables. --- dlls/wininet/http.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index b8ecb47..00dfa0f 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -74,6 +74,7 @@ static const WCHAR szProxy_Authorization[] = { 'P','r','o','x','y','-','A','u',' static const WCHAR szStatus[] = { 'S','t','a','t','u','s',0 }; static const WCHAR szKeepAlive[] = {'K','e','e','p','-','A','l','i','v','e',0}; static const WCHAR szGET[] = { 'G','E','T', 0 }; +static const WCHAR szCrLf[] = {'\r','\n', 0}; #define MAXHOSTNAME 100 #define MAX_FIELD_VALUE_LEN 256 @@ -256,7 +257,6 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve LPWSTR p; static const WCHAR szSpace[] = { ' ',0 }; - static const WCHAR szcrlf[] = {'\r','\n', 0}; static const WCHAR szColon[] = { ':',' ',0 }; static const WCHAR sztwocrlf[] = {'\r','\n','\r','\n', 0}; @@ -277,7 +277,7 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve { if (lpwhr->pCustHeaders[i].wFlags & HDR_ISREQUEST) { - req[n++] = szcrlf; + req[n++] = szCrLf; req[n++] = lpwhr->pCustHeaders[i].lpszField; req[n++] = szColon; req[n++] = lpwhr->pCustHeaders[i].lpszValue; @@ -2189,7 +2189,6 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev LPWSTR headers; DWORD len = 0; BOOL ret = FALSE; - static const WCHAR CRLF[] = {'\r','\n',0}; if (request_only) headers = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath, lpwhr->lpszVersion); @@ -2211,8 +2210,8 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev memcpy(lpBuffer, headers, len + sizeof(WCHAR)); else { - len = strlenW(CRLF) * sizeof(WCHAR); - memcpy(lpBuffer, CRLF, sizeof(CRLF)); + len = strlenW(szCrLf) * sizeof(WCHAR); + memcpy(lpBuffer, szCrLf, sizeof(szCrLf)); } TRACE("returning data: %s\n", debugstr_wn(lpBuffer, len / sizeof(WCHAR))); ret = TRUE; @@ -2225,7 +2224,6 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev } case HTTP_QUERY_RAW_HEADERS: { - static const WCHAR szCrLf[] = {'\r','\n',0}; LPWSTR * ppszRawHeaderLines = HTTP_Tokenize(lpwhr->lpszRawHeaders, szCrLf); DWORD i, size = 0; LPWSTR pszString = (WCHAR*)lpBuffer; @@ -3145,14 +3143,13 @@ static void HTTP_InsertCookies(LPWININETHTTPREQW lpwhr) { int cnt = 0; static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0}; - static const WCHAR szcrlf[] = {'\r','\n',0}; - size = sizeof(szCookie) + nCookieSize * sizeof(WCHAR) + sizeof(szcrlf); + size = sizeof(szCookie) + nCookieSize * sizeof(WCHAR) + sizeof(szCrLf); if ((lpszCookies = HeapAlloc(GetProcessHeap(), 0, size))) { cnt += sprintfW(lpszCookies, szCookie); InternetGetCookieW(lpszUrl, NULL, lpszCookies + cnt, &nCookieSize); - strcatW(lpszCookies, szcrlf); + strcatW(lpszCookies, szCrLf); HTTP_HttpAddRequestHeadersW(lpwhr, lpszCookies, strlenW(lpszCookies), HTTP_ADDREQ_FLAG_ADD); HeapFree(GetProcessHeap(), 0, lpszCookies); @@ -3722,7 +3719,6 @@ static INT HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr, BOOL clear) DWORD buflen = MAX_REPLY_LEN; BOOL bSuccess = FALSE; INT rc = 0; - static const WCHAR szCrLf[] = {'\r','\n',0}; static const WCHAR szHundred[] = {'1','0','0',0}; char bufferA[MAX_REPLY_LEN]; LPWSTR status_code, status_text;
1
0
0
0
Lei Zhang : wininet: Work around NULL headers when handling HTTP_QUERY_RAW_HEADERS_CRLF.
by Alexandre Julliard
28 Aug '08
28 Aug '08
Module: wine Branch: master Commit: bc9e214f6fb2ea68c9fcd7f635c47f3e85fc695c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc9e214f6fb2ea68c9fcd7f63…
Author: Lei Zhang <thestig(a)google.com> Date: Wed Aug 27 16:54:17 2008 -0700 wininet: Work around NULL headers when handling HTTP_QUERY_RAW_HEADERS_CRLF. --- dlls/wininet/http.c | 15 ++++++++++++--- dlls/wininet/tests/http.c | 10 ++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 4630f3b..b8ecb47 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2187,15 +2187,18 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev case HTTP_QUERY_RAW_HEADERS_CRLF: { LPWSTR headers; - DWORD len; + DWORD len = 0; BOOL ret = FALSE; + static const WCHAR CRLF[] = {'\r','\n',0}; if (request_only) headers = HTTP_BuildHeaderRequestString(lpwhr, lpwhr->lpszVerb, lpwhr->lpszPath, lpwhr->lpszVersion); else headers = lpwhr->lpszRawHeaders; - len = strlenW(headers) * sizeof(WCHAR); + if (headers) + len = strlenW(headers) * sizeof(WCHAR); + if (len + sizeof(WCHAR) > *lpdwBufferLength) { len += sizeof(WCHAR); @@ -2204,7 +2207,13 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev } else if (lpBuffer) { - memcpy(lpBuffer, headers, len + sizeof(WCHAR)); + if (headers) + memcpy(lpBuffer, headers, len + sizeof(WCHAR)); + else + { + len = strlenW(CRLF) * sizeof(WCHAR); + memcpy(lpBuffer, CRLF, sizeof(CRLF)); + } TRACE("returning data: %s\n", debugstr_wn(lpBuffer, len / sizeof(WCHAR))); ret = TRUE; } diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 9ad6274..1c52f27 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -1208,6 +1208,16 @@ static void HttpHeaders_test(void) /* end of W version tests */ + /* Without HTTP_QUERY_FLAG_REQUEST_HEADERS */ + index = 0; + len = sizeof(buffer); + memset(buffer, 'x', sizeof(buffer)); + ok(HttpQueryInfo(hRequest,HTTP_QUERY_RAW_HEADERS_CRLF, + buffer,&len,&index) == TRUE,"Query failed\n"); + ok(len == 2, "Expected 2, got %d\n", len); + ok(strcmp(buffer, "\r\n") == 0, "Expected CRLF, got '%s'\n", buffer); + ok(index == 0, "Index was incremented\n"); + ok(HttpAddRequestHeaders(hRequest,"Warning:test2",-1,HTTP_ADDREQ_FLAG_ADD), "Failed to add duplicate header using HTTP_ADDREQ_FLAG_ADD\n");
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
84
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200