summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-11-18 22:49:02 +0000
committerTim Potter <tpot@samba.org>2002-11-18 22:49:02 +0000
commit6631577f8a90e8184d1719a797d6f4e2e908de8e (patch)
treec11a7d4156a9161ff7e888a4ef3546f3f9edc7ff
parentbf909c0c368adcd92d9cffa637257f82c950413b (diff)
downloadsamba-6631577f8a90e8184d1719a797d6f4e2e908de8e.tar.gz
samba-6631577f8a90e8184d1719a797d6f4e2e908de8e.tar.bz2
samba-6631577f8a90e8184d1719a797d6f4e2e908de8e.zip
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)
-rw-r--r--source3/nsswitch/winbindd_misc.c3
1 files changed, 2 insertions, 1 deletions
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;
}