diff options
author | Jeremy Allison <jra@samba.org> | 2000-09-29 21:15:45 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-09-29 21:15:45 +0000 |
commit | 7de0b5588e855a967f0a5094c515b955ff4a23cf (patch) | |
tree | 203e0b8420600d8b9b87d285b7922654058c6747 | |
parent | 641d9223d2def8fc4cacf046bf9cc988e0ec5588 (diff) | |
download | samba-7de0b5588e855a967f0a5094c515b955ff4a23cf.tar.gz samba-7de0b5588e855a967f0a5094c515b955ff4a23cf.tar.bz2 samba-7de0b5588e855a967f0a5094c515b955ff4a23cf.zip |
Missing null termination on printer changenotify message caused insure
error.
Jeremy.
(This used to be commit 3733d29ce678c71ef2ee8b600e547765d8d8ea9e)
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index c281ccaacc..8996389039 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -584,11 +584,12 @@ static BOOL alloc_buffer_size(NEW_BUFFER *buffer, uint32 buffer_size) ****************************************************************************/ void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len) { - char printer[256]; + fstring printer; uint32 status; Printer_entry *find_printer; - memcpy(printer, buf, len); + *printer = '\0'; + fstrcpy(printer,buf); find_printer = (Printer_entry *)ubi_dlFirst(&Printer_list); @@ -630,7 +631,7 @@ static BOOL srv_spoolss_sendnotify(POLICY_HND *handle) fstrcpy(printer, ""); /*srv_spoolss_receive_message(printer);*/ - message_send_all(MSG_PRINTER_NOTIFY, printer, strlen(printer)); + message_send_all(MSG_PRINTER_NOTIFY, printer, strlen(printer) + 1); /* Null terminate... */ return True; } |