projects
/
radsecproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b23fcde
)
Don't smash buffer on stack.
author
Linus Nordberg
<linus@nordu.net>
Tue, 5 Apr 2011 13:26:53 +0000
(15:26 +0200)
committer
Linus Nordberg
<linus@nordu.net>
Tue, 5 Apr 2011 13:26:53 +0000
(15:26 +0200)
(format_hash): Don't write past OUT_LEN. Duh!
fticks.c
patch
|
blob
|
history
diff --git
a/fticks.c
b/fticks.c
index
724a589
..
ce4888e
100644
(file)
--- a/
fticks.c
+++ b/
fticks.c
@@
-21,7
+21,7
@@
format_hash(const uint8_t *hash, size_t out_len, uint8_t *out)
{
int i;
- for (i = 0; i < out_len / 2; i++)
+ for (i = 0; i < out_len / 2
- 1
; i++)
sprintf((char *) out + i*2, "%02x", hash[i % SHA256_DIGEST_SIZE]);
}