Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
050a46f3
Commit
050a46f3
authored
Sep 04, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Fix the base64 decoder.
parent
2d5ecbee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
request.c
dlls/winhttp/request.c
+16
-1
No files found.
dlls/winhttp/request.c
View file @
050a46f3
...
@@ -1384,7 +1384,7 @@ static unsigned int decode_base64( const WCHAR *base64, unsigned int len, char *
...
@@ -1384,7 +1384,7 @@ static unsigned int decode_base64( const WCHAR *base64, unsigned int len, char *
char
c0
,
c1
,
c2
,
c3
;
char
c0
,
c1
,
c2
,
c3
;
const
WCHAR
*
p
=
base64
;
const
WCHAR
*
p
=
base64
;
while
(
len
>
=
4
)
while
(
len
>
4
)
{
{
if
((
c0
=
decode_char
(
p
[
0
]
))
>
63
)
return
0
;
if
((
c0
=
decode_char
(
p
[
0
]
))
>
63
)
return
0
;
if
((
c1
=
decode_char
(
p
[
1
]
))
>
63
)
return
0
;
if
((
c1
=
decode_char
(
p
[
1
]
))
>
63
)
return
0
;
...
@@ -1422,6 +1422,21 @@ static unsigned int decode_base64( const WCHAR *base64, unsigned int len, char *
...
@@ -1422,6 +1422,21 @@ static unsigned int decode_base64( const WCHAR *base64, unsigned int len, char *
}
}
i
+=
2
;
i
+=
2
;
}
}
else
{
if
((
c0
=
decode_char
(
p
[
0
]
))
>
63
)
return
0
;
if
((
c1
=
decode_char
(
p
[
1
]
))
>
63
)
return
0
;
if
((
c2
=
decode_char
(
p
[
2
]
))
>
63
)
return
0
;
if
((
c3
=
decode_char
(
p
[
3
]
))
>
63
)
return
0
;
if
(
buf
)
{
buf
[
i
+
0
]
=
(
c0
<<
2
)
|
(
c1
>>
4
);
buf
[
i
+
1
]
=
(
c1
<<
4
)
|
(
c2
>>
2
);
buf
[
i
+
2
]
=
(
c2
<<
6
)
|
c3
;
}
i
+=
3
;
}
return
i
;
return
i
;
}
}
...
...
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