projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix memset call in md5.c
[project/libubox.git]
/
md5.c
diff --git
a/md5.c
b/md5.c
index 90bd1abf51915c837825b3aa57cb65fbf259fbba..f8d490ffd4a772d5f17cb91a110c9168f6c22c0d 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.
*/
* 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>
#include <sys/types.h>
#include <sys/stat.h>
@@
-255,7
+255,7
@@
int md5sum(char *file, uint32_t *md5)
int len, fd;
int ret = 0;
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)
fd = open(file, O_RDONLY);
if (fd < 0)