svn commit: samba r25136 - in branches: SAMBA_3_2/source/lib SAMBA_3_2_0/source/lib

jra at samba.org jra at samba.org
Thu Sep 13 17:26:00 GMT 2007


Author: jra
Date: 2007-09-13 17:25:57 +0000 (Thu, 13 Sep 2007)
New Revision: 25136

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25136

Log:
When tallocing a string to uppercase remember the terminating
'\0' in size calculations.
Jeremy.

Modified:
   branches/SAMBA_3_2/source/lib/charcnv.c
   branches/SAMBA_3_2_0/source/lib/charcnv.c


Changeset:
Modified: branches/SAMBA_3_2/source/lib/charcnv.c
===================================================================
--- branches/SAMBA_3_2/source/lib/charcnv.c	2007-09-13 16:48:46 UTC (rev 25135)
+++ branches/SAMBA_3_2/source/lib/charcnv.c	2007-09-13 17:25:57 UTC (rev 25136)
@@ -841,7 +841,7 @@
 		TALLOC_FREE(out_buffer);
 
 		size = convert_string_talloc(ctx, CH_UNIX, CH_UTF16LE,
-				s, strlen(s),
+				s, strlen(s)+1,
 				(void *)&ubuf,
 				True);
 		if (size == (size_t)-1) {

Modified: branches/SAMBA_3_2_0/source/lib/charcnv.c
===================================================================
--- branches/SAMBA_3_2_0/source/lib/charcnv.c	2007-09-13 16:48:46 UTC (rev 25135)
+++ branches/SAMBA_3_2_0/source/lib/charcnv.c	2007-09-13 17:25:57 UTC (rev 25136)
@@ -841,7 +841,7 @@
 		TALLOC_FREE(out_buffer);
 
 		size = convert_string_talloc(ctx, CH_UNIX, CH_UTF16LE,
-				s, strlen(s),
+				s, strlen(s)+1,
 				(void *)&ubuf,
 				True);
 		if (size == (size_t)-1) {



More information about the samba-cvs mailing list