repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libnfs_authunix_create: make valgrind happy
[deb_libnfs.git]
/
lib
/
libnfs-zdr.c
diff --git
a/lib/libnfs-zdr.c
b/lib/libnfs-zdr.c
index 21cd9e13fe5de2ca0c3f00aa3cf8399b9780b800..f5e1a11270291e191d526ce1703e1018061f2567 100644
(file)
--- a/
lib/libnfs-zdr.c
+++ b/
lib/libnfs-zdr.c
@@
-476,10
+476,12
@@
struct AUTH *libnfs_authunix_create(char *host, uint32_t uid, uint32_t gid, uint
size = 4 + 4 + ((strlen(host) + 3) & ~3) + 4 + 4 + 4 + len * 4;
auth = malloc(sizeof(struct AUTH));
size = 4 + 4 + ((strlen(host) + 3) & ~3) + 4 + 4 + 4 + len * 4;
auth = malloc(sizeof(struct AUTH));
+ memset(auth, 0x00, sizeof(struct AUTH));
auth->ah_cred.oa_flavor = AUTH_UNIX;
auth->ah_cred.oa_length = size;
auth->ah_cred.oa_base = malloc(size);
auth->ah_cred.oa_flavor = AUTH_UNIX;
auth->ah_cred.oa_length = size;
auth->ah_cred.oa_base = malloc(size);
+ memset(auth->ah_cred.oa_base, 0x00, size);
buf = (uint32_t *)auth->ah_cred.oa_base;
idx = 0;
buf[idx++] = htonl(time(NULL));
buf = (uint32_t *)auth->ah_cred.oa_base;
idx = 0;
buf[idx++] = htonl(time(NULL));