From 3d3b84bdec1406ef888b15d1fcd181b316fa7a86 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 10 Apr 2010 12:57:13 +0200 Subject: libwbclient: Take -21 into account in length guessing --- nsswitch/libwbclient/wbc_sid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nsswitch/libwbclient') 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); -- cgit