From 955003ebce31773388592e041a2399cb0004a4b3 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 18 Oct 2002 23:52:05 +0000 Subject: must add one to the extra_data size to transfer the 0 string terminator. This was causing "wbinfo --sequence" to access past the end of malloced memory. (This used to be commit 4125c582aaf86ee5d92b0c800266543a390aefce) --- source3/nsswitch/winbindd_misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index 45f2d42f98..c2e744c0a7 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -182,7 +182,8 @@ enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state) } state->response.extra_data = extra_data; - state->response.length += strlen(extra_data); + /* must add one to length to copy the 0 for string termination */ + state->response.length += strlen(extra_data) + 1; return WINBINDD_OK; } -- cgit