svn commit: samba r4668 - in branches/SAMBA_3_0/source/rpc_parse: .
jerry at samba.org
jerry at samba.org
Tue Jan 11 02:53:01 GMT 2005
Author: jerry
Date: 2005-01-11 02:53:00 +0000 (Tue, 11 Jan 2005)
New Revision: 4668
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4668
Log:
allow the caller to invoke init_unistr2() with a NULL buffer to match previous behavior; more checks to come tomorrow
Modified:
branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_misc.c 2005-01-11 02:18:42 UTC (rev 4667)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_misc.c 2005-01-11 02:53:00 UTC (rev 4668)
@@ -895,7 +895,15 @@
if (buf) {
/* We always null terminate the copy. */
len = strlen(buf) + 1;
+ } else {
+ /* no buffer -- nothing to do */
+ str->uni_max_len = 0;
+ str->offset = 0;
+ str->uni_str_len = 0;
+
+ return;
}
+
str->buffer = TALLOC_ZERO_ARRAY(get_talloc_ctx(), uint16, len);
if (str->buffer == NULL) {
More information about the samba-cvs
mailing list