svn commit: samba r2580 - in branches/SAMBA_4_0/source/ntvfs/ipc: .

tridge at samba.org tridge at samba.org
Fri Sep 24 03:31:43 GMT 2004


Author: tridge
Date: 2004-09-24 03:31:43 +0000 (Fri, 24 Sep 2004)
New Revision: 2580

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs/ipc&rev=2580&nolog=1

Log:
fixed an uninitialised byte found by valgrind

Modified:
   branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c	2004-09-24 01:32:24 UTC (rev 2579)
+++ branches/SAMBA_4_0/source/ntvfs/ipc/rap_server.c	2004-09-24 03:31:43 UTC (rev 2580)
@@ -32,12 +32,12 @@
 	r->out.info = talloc_array_p(req,
 				     union rap_shareenum_info, 2);
 
-	strncpy(r->out.info[0].info1.name, "C$", 12);
+	strncpy(r->out.info[0].info1.name, "C$", sizeof(r->out.info[0].info1.name));
 	r->out.info[0].info1.pad = 0;
 	r->out.info[0].info1.type = 0;
 	r->out.info[0].info1.comment = talloc_strdup(req, "Bla");
 	
-	strncpy(r->out.info[1].info1.name, "IPC$", 12);
+	strncpy(r->out.info[1].info1.name, "IPC$", sizeof(r->out.info[0].info1.name));
 	r->out.info[1].info1.pad = 0;
 	r->out.info[1].info1.type = 1;
 	r->out.info[1].info1.comment = talloc_strdup(req, "Blub");



More information about the samba-cvs mailing list