git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d16a5c4
)
r4668: allow the caller to invoke init_unistr2() with a NULL buffer to match previous...
author
Gerald Carter
<jerry@samba.org>
Tue, 11 Jan 2005 02:53:00 +0000
(
02:53
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 15:53:51 +0000
(10:53 -0500)
(This used to be commit
9a29bef056f92ef6f1df01f56c121088f84be16b
)
source3/rpc_parse/parse_misc.c
patch
|
blob
|
history
diff --git
a/source3/rpc_parse/parse_misc.c
b/source3/rpc_parse/parse_misc.c
index b53f9ec98cd5e2faf8c52dc90fbd816bdd3339d4..bca40a64c829b147086d890a5d271de1a2451f09 100644
(file)
--- a/
source3/rpc_parse/parse_misc.c
+++ b/
source3/rpc_parse/parse_misc.c
@@
-895,7
+895,15
@@
void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags)
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) {