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
e0708d06
Commit
e0708d06
authored
Oct 09, 2019
by
Jeff Smith
Committed by
Alexandre Julliard
Oct 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix CryptBinaryToString return value on short base64 buffer.
Signed-off-by:
Jeff Smith
<
whydoubt@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6cbedfa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
base64.c
dlls/crypt32/base64.c
+2
-2
base64.c
dlls/crypt32/tests/base64.c
+0
-2
No files found.
dlls/crypt32/base64.c
View file @
e0708d06
...
...
@@ -240,7 +240,7 @@ static BOOL BinaryToBase64A(const BYTE *pbBinary,
else
{
*
pcchString
=
charsNeeded
;
SetLastError
(
ERROR_
INSUFFICIENT_BUFFER
);
SetLastError
(
ERROR_
MORE_DATA
);
ret
=
FALSE
;
}
}
...
...
@@ -460,7 +460,7 @@ static BOOL BinaryToBase64W(const BYTE *pbBinary,
else
{
*
pcchString
=
charsNeeded
;
SetLastError
(
ERROR_
INSUFFICIENT_BUFFER
);
SetLastError
(
ERROR_
MORE_DATA
);
ret
=
FALSE
;
}
}
...
...
dlls/crypt32/tests/base64.c
View file @
e0708d06
...
...
@@ -134,7 +134,6 @@ static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen,
strLen2
=
strLen
-
1
;
str
[
0
]
=
0x12
;
ret
=
CryptBinaryToStringA
(
toEncode
,
toEncodeLen
,
format
,
str
,
&
strLen2
);
todo_wine
ok
((
!
ret
&&
GetLastError
()
==
ERROR_MORE_DATA
)
||
broken
(
ret
)
/* XP */
,
"CryptBinaryToStringA failed %d, error %d.
\n
"
,
ret
,
GetLastError
());
ok
(
strLen2
==
strLen
||
broken
(
strLen2
==
strLen
-
1
),
"Expected length %d, got %d
\n
"
,
strLen
,
strLen2
);
...
...
@@ -207,7 +206,6 @@ static void encode_compare_base64_W(const BYTE *toEncode, DWORD toEncodeLen, DWO
strLen2
=
strLen
-
1
;
strW
[
0
]
=
0x1234
;
ret
=
CryptBinaryToStringW
(
toEncode
,
toEncodeLen
,
format
,
strW
,
&
strLen2
);
todo_wine
ok
((
!
ret
&&
GetLastError
()
==
ERROR_MORE_DATA
)
||
broken
(
ret
)
/* XP */
,
"CryptBinaryToStringW failed, %d, error %d
\n
"
,
ret
,
GetLastError
());
if
(
headerW
)
...
...
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