diff options
author | Herb Lewis <herb@samba.org> | 2002-10-18 23:52:05 +0000 |
---|---|---|
committer | Herb Lewis <herb@samba.org> | 2002-10-18 23:52:05 +0000 |
commit | 955003ebce31773388592e041a2399cb0004a4b3 (patch) | |
tree | 69da1fa01f37fde08c3cbf957695936662da6c2a /source3/nsswitch/winbindd_misc.c | |
parent | 9cfa18208ba515ab2d49f945d955dcb9a5c68103 (diff) | |
download | samba-955003ebce31773388592e041a2399cb0004a4b3.tar.gz samba-955003ebce31773388592e041a2399cb0004a4b3.tar.xz samba-955003ebce31773388592e041a2399cb0004a4b3.zip |
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)
Diffstat (limited to 'source3/nsswitch/winbindd_misc.c')
-rw-r--r-- | source3/nsswitch/winbindd_misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index 45f2d42f980..c2e744c0a7e 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; } |