From b40dc47dc4ae453674ec7b31f04aaf1b911010aa Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 23 Oct 2023 21:35:42 -0500 Subject: move md5 and fix memory leaks lol --- src/hash/sha01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/hash/sha01.c') diff --git a/src/hash/sha01.c b/src/hash/sha01.c index e0cf1c7..b606daa 100644 --- a/src/hash/sha01.c +++ b/src/hash/sha01.c @@ -29,7 +29,7 @@ void i_sha01(unsigned version, char* out_stream, const char* input){ uint32_t hat = 0; for(int z = 0; z < tlen; z+=(512/8)){ uint32_t W[80]; - memset (W, 0, 80 * sizeof (uint32_t)); + memset(W, 0, 80 * sizeof (uint32_t)); for(int i = 0; i != 16; i++){ int t = 24; @@ -83,7 +83,7 @@ void i_sha01(unsigned version, char* out_stream, const char* input){ } sprintf(out_stream,"%02x%02x%02x%02x%02x",h0,h1,h2,h3,h4); - return; + free(by); } int l_sha1(lua_State* L){ -- cgit v1.2.3