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
9fa27f3b
Commit
9fa27f3b
authored
Nov 12, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Nov 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Move type-check before len-check (Coverity).
parent
ded9943b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
rsa.c
dlls/rsaenh/rsa.c
+6
-6
No files found.
dlls/rsaenh/rsa.c
View file @
9fa27f3b
...
...
@@ -62,12 +62,6 @@ int rand_prime(mp_int *N, long len)
{
int
type
;
/* allow sizes between 2 and 256 bytes for a prime size */
if
(
len
<
16
||
len
>
8192
)
{
printf
(
"Invalid prime size!
\n
"
);
return
CRYPT_INVALID_PRIME_SIZE
;
}
/* get type */
if
(
len
<
0
)
{
type
=
LTM_PRIME_BBS
;
...
...
@@ -78,6 +72,12 @@ int rand_prime(mp_int *N, long len)
/* Original LibTomCrypt: type = 0; */
}
/* allow sizes between 2 and 256 bytes for a prime size */
if
(
len
<
16
||
len
>
8192
)
{
printf
(
"Invalid prime size!
\n
"
);
return
CRYPT_INVALID_PRIME_SIZE
;
}
/* New prime generation makes the code even more cryptoish-insane. Do you know what this means!!!
-- Gir: Yeah, oh wait, er, no.
*/
...
...
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