jshn: pretty print indented output with jshn -i -w
[project/libubox.git] / md5.c
diff --git a/md5.c b/md5.c
index 90bd1ab..c9064dc 100644 (file)
--- a/md5.c
+++ b/md5.c
@@ -12,7 +12,7 @@
  *  Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
-#include <libubox/blob.h> /* TODO: better include for bswap_32 compat */
+#include "blob.h" /* TODO: better include for bswap_32 compat */
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -113,7 +113,6 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx)
        for (i = 0; i < 16; i++) {
                cwp[i] = SWAP_LE32(words[i]);
        }
-       words += 16;
 
        pc = C_array;
        pp = P_array;
@@ -255,7 +254,7 @@ int md5sum(char *file, uint32_t *md5)
        int len, fd;
        int ret = 0;
 
-       memset(md5, 0, sizeof(md5));
+       memset(md5, 0, sizeof(*md5) * 4);
 
        fd = open(file, O_RDONLY);
        if (fd < 0)