Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dmitry Baryshkov
nettle
Commits
11540d02
Commit
11540d02
authored
Jan 3, 2017
by
Nikos Mavrogiannopoulos
Committed by
Niels Möller
Jan 3, 2017
Browse files
Options
Downloads
Patches
Plain Diff
ecdsa_verify: eliminated memory leak on error path
parent
f8ad54fa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ecdsa-verify.c
+3
-1
3 additions, 1 deletion
ecdsa-verify.c
with
3 additions
and
1 deletion
ecdsa-verify.c
+
3
−
1
View file @
11540d02
...
...
@@ -52,7 +52,7 @@ ecdsa_verify (const struct ecc_point *pub,
/* For ECC_MUL_A_WBITS == 0, at most 1512 bytes. With
ECC_MUL_A_WBITS == 4, currently needs 67 * ecc->size, at most
4824 bytes. Don't use stack allocation for this. */
mp_limb_t
*
scratch
=
gmp_alloc_limbs
(
itch
)
;
mp_limb_t
*
scratch
;
int
res
;
#define rp scratch
...
...
@@ -63,6 +63,8 @@ ecdsa_verify (const struct ecc_point *pub,
||
mpz_sgn
(
signature
->
s
)
<=
0
||
mpz_size
(
signature
->
s
)
>
size
)
return
0
;
scratch
=
gmp_alloc_limbs
(
itch
);
mpz_limbs_copy
(
rp
,
signature
->
r
,
size
);
mpz_limbs_copy
(
sp
,
signature
->
s
,
size
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment