Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Wim Lewis
nettle
Commits
5a77574e
Commit
5a77574e
authored
Sep 16, 2012
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory leak in pkcs1-conv.
parent
b59383d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
ChangeLog
ChangeLog
+6
-0
tools/pkcs1-conv.c
tools/pkcs1-conv.c
+5
-1
No files found.
ChangeLog
View file @
5a77574e
2012-09-16 Niels Möller <nisse@lysator.liu.se>
* tools/pkcs1-conv.c (convert_public_key): Added missing calls to
dsa_public_key_clear and rsa_public_key_clear.
(main): Added missing nettle_buffer_clear.
2012-09-10 Niels Möller <nisse@lysator.liu.se>
* examples/eratosthenes.c (main): Explicitly deallocate storage
...
...
tools/pkcs1-conv.c
View file @
5a77574e
...
...
@@ -415,6 +415,7 @@ convert_public_key(struct nettle_buffer *buffer, unsigned length, const uint8_t
nettle_buffer_reset
(
buffer
);
res
=
dsa_keypair_to_sexp
(
buffer
,
NULL
,
&
pub
,
NULL
)
>
0
;
}
dsa_public_key_clear
(
&
pub
);
}
if
(
!
res
)
werror
(
"SubjectPublicKeyInfo: Invalid DSA key.
\n
"
);
...
...
@@ -438,6 +439,7 @@ convert_public_key(struct nettle_buffer *buffer, unsigned length, const uint8_t
nettle_buffer_reset
(
buffer
);
res
=
rsa_keypair_to_sexp
(
buffer
,
NULL
,
&
pub
,
NULL
)
>
0
;
}
rsa_public_key_clear
(
&
pub
);
}
if
(
!
res
)
werror
(
"SubjectPublicKeyInfo: Invalid RSA key.
\n
"
);
...
...
@@ -448,7 +450,7 @@ convert_public_key(struct nettle_buffer *buffer, unsigned length, const uint8_t
}
else
werror
(
"SubjectPublicKeyInfo: Invalid object.
\n
"
);
return
res
;
}
...
...
@@ -656,5 +658,7 @@ main(int argc, char **argv)
fclose
(
f
);
}
}
nettle_buffer_clear
(
&
buffer
);
return
EXIT_SUCCESS
;
}
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