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
f6833c4d
Commit
f6833c4d
authored
Nov 11, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Check pad bytes for consistency when decrypting.
parent
cb113b23
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
rsaenh.c
dlls/rsaenh/rsaenh.c
+13
-1
No files found.
dlls/rsaenh/rsaenh.c
View file @
f6833c4d
...
@@ -2127,13 +2127,25 @@ BOOL WINAPI RSAENH_CPDecrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
...
@@ -2127,13 +2127,25 @@ BOOL WINAPI RSAENH_CPDecrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
if
(
Final
)
{
if
(
Final
)
{
if
(
pbData
[
*
pdwDataLen
-
1
]
&&
if
(
pbData
[
*
pdwDataLen
-
1
]
&&
pbData
[
*
pdwDataLen
-
1
]
<=
pCryptKey
->
dwBlockLen
&&
pbData
[
*
pdwDataLen
-
1
]
<=
pCryptKey
->
dwBlockLen
&&
pbData
[
*
pdwDataLen
-
1
]
<
*
pdwDataLen
)
pbData
[
*
pdwDataLen
-
1
]
<
*
pdwDataLen
)
{
BOOL
padOkay
=
TRUE
;
/* check that every bad byte has the same value */
for
(
i
=
1
;
padOkay
&&
i
<
pbData
[
*
pdwDataLen
-
1
];
i
++
)
if
(
pbData
[
*
pdwDataLen
-
i
-
1
]
!=
pbData
[
*
pdwDataLen
-
1
])
padOkay
=
FALSE
;
if
(
padOkay
)
*
pdwDataLen
-=
pbData
[
*
pdwDataLen
-
1
];
*
pdwDataLen
-=
pbData
[
*
pdwDataLen
-
1
];
else
{
else
{
SetLastError
(
NTE_BAD_DATA
);
SetLastError
(
NTE_BAD_DATA
);
return
FALSE
;
return
FALSE
;
}
}
}
}
else
{
SetLastError
(
NTE_BAD_DATA
);
return
FALSE
;
}
}
}
else
if
(
GET_ALG_TYPE
(
pCryptKey
->
aiAlgid
)
==
ALG_TYPE_STREAM
)
{
}
else
if
(
GET_ALG_TYPE
(
pCryptKey
->
aiAlgid
)
==
ALG_TYPE_STREAM
)
{
encrypt_stream_impl
(
pCryptKey
->
aiAlgid
,
&
pCryptKey
->
context
,
pbData
,
*
pdwDataLen
);
encrypt_stream_impl
(
pCryptKey
->
aiAlgid
,
&
pCryptKey
->
context
,
pbData
,
*
pdwDataLen
);
...
...
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