summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_misc.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-15 19:43:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:01 -0500
commit61dfab9f705cb38e552dcec1822974433997543c (patch)
treef2b5b3f412f7a31c0de1057a9592a3fdcc6fb427 /source3/rpc_parse/parse_misc.c
parent3b7dccf076628114d4fb1f67ab7aa05457de367d (diff)
downloadsamba-61dfab9f705cb38e552dcec1822974433997543c.tar.gz
samba-61dfab9f705cb38e552dcec1822974433997543c.tar.bz2
samba-61dfab9f705cb38e552dcec1822974433997543c.zip
r5805: merging spoolss parsing changes from trunk and cleaning up resulting segvs
(This used to be commit 25121547caaaed0d60f4db7458570c14e7d21b2a)
Diffstat (limited to 'source3/rpc_parse/parse_misc.c')
-rw-r--r--source3/rpc_parse/parse_misc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index bca40a64c8..dec20769b6 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -1797,3 +1797,22 @@ BOOL make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer)
return True;
}
+
+/*******************************************************************
+return the length of a UNISTR string.
+********************************************************************/
+
+uint32 str_len_uni(UNISTR *source)
+{
+ uint32 i=0;
+
+ if (!source->buffer)
+ return 0;
+
+ while (source->buffer[i])
+ i++;
+
+ return i;
+}
+
+