summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_parse/parse_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 51587e6d7a..a84469f8f9 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -530,7 +530,7 @@ void make_buffer2(BUFFER2 *str, const char *buf, int len)
str->undoc = 0;
/* store the string */
- ascii_to_unibuf(str->buffer, buf, len);
+ ascii_to_unibuf(str->buffer, buf, MIN(str->buf_len, sizeof(str->buffer)-1));
}
/*******************************************************************