diff options
author | Volker Lendecke <vl@samba.org> | 2010-04-10 12:57:13 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-19 14:27:17 +0200 |
commit | 3d3b84bdec1406ef888b15d1fcd181b316fa7a86 (patch) | |
tree | d95680ee4ad36ea40af82acb8aabb096f2f95d23 | |
parent | d29a5e69f4343f0876c374968dc00198243afef2 (diff) | |
download | samba-3d3b84bdec1406ef888b15d1fcd181b316fa7a86.tar.gz samba-3d3b84bdec1406ef888b15d1fcd181b316fa7a86.tar.bz2 samba-3d3b84bdec1406ef888b15d1fcd181b316fa7a86.zip |
libwbclient: Take -21 into account in length guessing
-rw-r--r-- | nsswitch/libwbclient/wbc_sid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c index 08d63d9699..20f70b5b91 100644 --- a/nsswitch/libwbclient/wbc_sid.c +++ b/nsswitch/libwbclient/wbc_sid.c @@ -521,10 +521,10 @@ wbcErr wbcGetSidAliases(const struct wbcDomainSid *dom_sid, wbcFreeMemory(sid_string); sid_string = NULL; - /* Lets assume each sid is around 54 characters - * S-1-5-AAAAAAAAAAA-BBBBBBBBBBB-CCCCCCCCCCC-DDDDDDDDDDD\n */ - buflen = 54 * num_sids; - extra_data = talloc_array(NULL, char, buflen); + /* Lets assume each sid is around 57 characters + * S-1-5-21-AAAAAAAAAAA-BBBBBBBBBBB-CCCCCCCCCCC-DDDDDDDDDDD\n */ + buflen = 57 * num_sids; + extra_data = (char *)malloc(buflen); if (!extra_data) { wbc_status = WBC_ERR_NO_MEMORY; BAIL_ON_WBC_ERROR(wbc_status); |