From 6631577f8a90e8184d1719a797d6f4e2e908de8e Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 18 Nov 2002 22:49:02 +0000 Subject: Merge from HEAD: >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 a3c4f013d679c97dd56779c927884deae0c1027a) --- 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 079a49a317..d656c3ca4d 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -180,7 +180,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