From 23f338d1da96fd4ea3283bc96ca7d496b23bf854 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 17 Jul 2008 09:23:30 -0700 Subject: [PATCH] allow SID with 0 in subauthority to be converted properly from string representation. --- source/nsswitch/libwbclient/wbc_sid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/nsswitch/libwbclient/wbc_sid.c b/source/nsswitch/libwbclient/wbc_sid.c index f3d58960f2a..475c9947e00 100644 --- a/source/nsswitch/libwbclient/wbc_sid.c +++ b/source/nsswitch/libwbclient/wbc_sid.c @@ -139,7 +139,8 @@ wbcErr wbcStringToSid(const char *str, p = q +1; sid->num_auths = 0; while (sid->num_auths < WBC_MAXSUBAUTHS) { - if ((x=(uint32_t)strtoul(p, &q, 10)) == 0) + x=(uint32_t)strtoul(p, &q, 10); + if (p == q) break; if (q == NULL) { wbc_status = WBC_ERR_INVALID_SID; -- 2.11.4.GIT