Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Baryshkov
nettle
Commits
de5c0855
Commit
de5c0855
authored
Feb 07, 2004
by
Niels Möller
Browse files
(sexp_put_digest): Use TMP_DECL instead of alloca.
Rev: src/nettle/tools/output.c:1.4
parent
1d4c0f9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/output.c
View file @
de5c0855
...
...
@@ -32,6 +32,9 @@
#include
"output.h"
/* For TMP_ALLOC */
#include
"nettle-internal.h"
void
sexp_output_init
(
struct
sexp_output
*
output
,
FILE
*
f
,
unsigned
width
,
int
prefer_hex
)
...
...
@@ -268,11 +271,11 @@ sexp_put_string(struct sexp_output *output, enum sexp_mode mode,
void
sexp_put_digest
(
struct
sexp_output
*
output
)
{
uint8_t
*
digest
;
TMP_DECL
(
digest
,
uint8_t
,
NETTLE_MAX_HASH_DIGEST_SIZE
);
TMP_ALLOC
(
digest
,
output
->
hash
->
digest_size
);
assert
(
output
->
hash
);
digest
=
alloca
(
output
->
hash
->
digest_size
);
output
->
hash
->
digest
(
output
->
ctx
,
output
->
hash
->
digest_size
,
digest
);
sexp_put_code_start
(
output
,
&
nettle_base16
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment