diff options
author | Jeremy Allison <jra@samba.org> | 2009-04-23 02:02:28 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-04-23 02:02:28 -0700 |
commit | 6610327770f3e7dd3e7a9b71d34b82f1f198a8a4 (patch) | |
tree | 28e951e339b8c53212f7abb9be83d0cb01147f48 /source3 | |
parent | 951de687216b13e35876325e7b3c8081ea725dc8 (diff) | |
download | samba-6610327770f3e7dd3e7a9b71d34b82f1f198a8a4.tar.gz samba-6610327770f3e7dd3e7a9b71d34b82f1f198a8a4.tar.bz2 samba-6610327770f3e7dd3e7a9b71d34b82f1f198a8a4.zip |
Fix Coverity bug #902, uninitialized variable.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 4 | ||||
-rw-r--r-- | source3/nmbd/nmbd_processlogon.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index f69845b346..4045184f33 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1936,7 +1936,9 @@ bool send_mailslot(bool unique, const char *mailslot,char *buf, size_t len, DEBUG(0, ("send_mailslot: Cannot write beyond end of packet\n")); return False; } else { - memcpy(p2,buf,len); + if (len) { + memcpy(p2,buf,len); + } p2 += len; } diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 8173337da0..43e80af394 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -267,7 +267,7 @@ static void nmbd_proxy_logon_done(struct tevent_req *subreq) tevent_req_callback_data(subreq, struct nmbd_proxy_logon_state); NTSTATUS status; - DATA_BLOB response; + DATA_BLOB response = data_blob_null; status = cldap_netlogon_recv(subreq, NULL, state, &state->io); if (!NT_STATUS_IS_OK(status)) { |