Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d870d410
Commit
d870d410
authored
Jul 05, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use the more common ARRAY_SIZE spelling.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b412c166
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
http.c
dlls/wininet/http.c
+9
-11
No files found.
dlls/wininet/http.c
View file @
d870d410
...
...
@@ -145,8 +145,6 @@ static const WCHAR emptyW[] = {0};
#define COLLECT_TIME 60000
#define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
struct
HttpAuthInfo
{
LPWSTR
scheme
;
...
...
@@ -810,12 +808,12 @@ static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue, LPWSTR *pszRealm )
static
const
WCHAR
szBasic
[]
=
{
'B'
,
'a'
,
's'
,
'i'
,
'c'
};
/* Note: not nul-terminated */
static
const
WCHAR
szRealm
[]
=
{
'r'
,
'e'
,
'a'
,
'l'
,
'm'
};
/* Note: not nul-terminated */
BOOL
is_basic
;
is_basic
=
!
strncmpiW
(
pszAuthValue
,
szBasic
,
ARRAYSIZE
(
szBasic
))
&&
((
pszAuthValue
[
ARRAY
SIZE
(
szBasic
)]
==
' '
)
||
!
pszAuthValue
[
ARRAY
SIZE
(
szBasic
)]);
is_basic
=
!
strncmpiW
(
pszAuthValue
,
szBasic
,
ARRAY
_
SIZE
(
szBasic
))
&&
((
pszAuthValue
[
ARRAY
_SIZE
(
szBasic
)]
==
' '
)
||
!
pszAuthValue
[
ARRAY_
SIZE
(
szBasic
)]);
if
(
is_basic
&&
pszRealm
)
{
LPCWSTR
token
;
LPCWSTR
ptr
=
&
pszAuthValue
[
ARRAYSIZE
(
szBasic
)];
LPCWSTR
ptr
=
&
pszAuthValue
[
ARRAY
_
SIZE
(
szBasic
)];
LPCWSTR
realm
;
ptr
++
;
*
pszRealm
=
NULL
;
...
...
@@ -825,8 +823,8 @@ static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue, LPWSTR *pszRealm )
realm
=
ptr
;
while
(
*
realm
==
' '
)
realm
++
;
if
(
!
strncmpiW
(
realm
,
szRealm
,
ARRAYSIZE
(
szRealm
))
&&
(
realm
[
ARRAY
SIZE
(
szRealm
)]
==
' '
||
realm
[
ARRAY
SIZE
(
szRealm
)]
==
'='
))
if
(
!
strncmpiW
(
realm
,
szRealm
,
ARRAY
_
SIZE
(
szRealm
))
&&
(
realm
[
ARRAY
_SIZE
(
szRealm
)]
==
' '
||
realm
[
ARRAY_
SIZE
(
szRealm
)]
==
'='
))
{
token
++
;
while
(
*
token
==
' '
)
...
...
@@ -1566,9 +1564,9 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin )
{
signed
char
in
[
4
];
if
(
base64
[
0
]
>=
ARRAYSIZE
(
HTTP_Base64Dec
)
||
if
(
base64
[
0
]
>=
ARRAY
_
SIZE
(
HTTP_Base64Dec
)
||
((
in
[
0
]
=
HTTP_Base64Dec
[
base64
[
0
]])
==
-
1
)
||
base64
[
1
]
>=
ARRAYSIZE
(
HTTP_Base64Dec
)
||
base64
[
1
]
>=
ARRAY
_
SIZE
(
HTTP_Base64Dec
)
||
((
in
[
1
]
=
HTTP_Base64Dec
[
base64
[
1
]])
==
-
1
))
{
WARN
(
"invalid base64: %s
\n
"
,
debugstr_w
(
base64
));
...
...
@@ -1580,7 +1578,7 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin )
if
((
base64
[
2
]
==
'='
)
&&
(
base64
[
3
]
==
'='
))
break
;
if
(
base64
[
2
]
>
ARRAYSIZE
(
HTTP_Base64Dec
)
||
if
(
base64
[
2
]
>
ARRAY
_
SIZE
(
HTTP_Base64Dec
)
||
((
in
[
2
]
=
HTTP_Base64Dec
[
base64
[
2
]])
==
-
1
))
{
WARN
(
"invalid base64: %s
\n
"
,
debugstr_w
(
&
base64
[
2
]));
...
...
@@ -1592,7 +1590,7 @@ static UINT HTTP_DecodeBase64( LPCWSTR base64, LPSTR bin )
if
(
base64
[
3
]
==
'='
)
break
;
if
(
base64
[
3
]
>
ARRAYSIZE
(
HTTP_Base64Dec
)
||
if
(
base64
[
3
]
>
ARRAY
_
SIZE
(
HTTP_Base64Dec
)
||
((
in
[
3
]
=
HTTP_Base64Dec
[
base64
[
3
]])
==
-
1
))
{
WARN
(
"invalid base64: %s
\n
"
,
debugstr_w
(
&
base64
[
3
]));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment