mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
s3:winbind: Fix wrong string zero termination for empty groups
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Tue Mar 28 08:36:50 UTC 2023 on atb-devel-224
This commit is contained in:
parent
d964700a19
commit
a11d6fe590
@ -145,7 +145,9 @@ NTSTATUS winbindd_print_groupmembers(struct db_context *members,
|
||||
DBG_NOTICE("dbwrap_traverse failed: %s\n", nt_errstr(status));
|
||||
return status;
|
||||
}
|
||||
m.buf[c.len-1] = '\0';
|
||||
if (c.len > 0) {
|
||||
m.buf[c.len - 1] = '\0';
|
||||
}
|
||||
|
||||
*num_members = c.num;
|
||||
*result = m.buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user