svn commit: samba r14904 - in branches/SAMBA_4_0/source/librpc/ndr: .

tridge at samba.org tridge at samba.org
Tue Apr 4 04:16:02 GMT 2006


Author: tridge
Date: 2006-04-04 04:16:02 +0000 (Tue, 04 Apr 2006)
New Revision: 14904

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

Log:

fixed LIBNDR_FLAG_STR_CHARLEN (thanks to Metze for noticing this)

Modified:
   branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c	2006-04-04 02:02:50 UTC (rev 14903)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c	2006-04-04 04:16:02 UTC (rev 14904)
@@ -315,7 +315,7 @@
 		flags &= ~LIBNDR_FLAG_STR_UTF8;
 	}
 
-	flags &= ~(LIBNDR_FLAG_STR_CONFORMANT | LIBNDR_FLAG_STR_CHARLEN);
+	flags &= ~LIBNDR_FLAG_STR_CONFORMANT;
 
 	if (!(flags & LIBNDR_FLAG_STR_NOTERM)) {
 		s_len++;
@@ -329,6 +329,9 @@
 	if (flags & LIBNDR_FLAG_STR_BYTESIZE) {
 		c_len = d_len;
 		flags &= ~LIBNDR_FLAG_STR_BYTESIZE;
+	} else if (flags & LIBNDR_FLAG_STR_CHARLEN) {
+		c_len = (d_len / byte_mul)-1;
+		flags &= ~LIBNDR_FLAG_STR_CHARLEN;
 	} else {
 		c_len = d_len / byte_mul;
 	}



More information about the samba-cvs mailing list