tUse strlen() rather than sizeof() - sick - sign and check files using ed25519
(HTM) git clone git://z3bra.org/sick
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 77e9241884ebb0cb48f6038baf35cafa02952a51
(DIR) parent a92ed5dba1cf5168b8b7db759641bed54e7751bd
(HTM) Author: z3bra <willyatmailoodotorg>
Date: Sun, 15 May 2016 19:30:10 +0200
Use strlen() rather than sizeof()
Diffstat:
M sick.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/sick.c b/sick.c
t@@ -132,7 +132,7 @@ sign(FILE *fp, FILE *key)
free(msg);
/* .. followed by the signature delimiter .. */
- fwrite(SIGBEGIN, 1, sizeof(SIGBEGIN), stdout);
+ fwrite(SIGBEGIN, 1, strlen(SIGBEGIN), stdout);
/* .. then the base64 encoded signature .. */
len = base64_encode(&base64, sig, 64);
t@@ -140,7 +140,7 @@ sign(FILE *fp, FILE *key)
free(base64);
/* .. and the final signature delimiter! */
- fwrite(SIGEND, 1, sizeof(SIGEND), stdout);
+ fwrite(SIGEND, 1, strlen(SIGEND), stdout);
return 0;
}