summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/libwbclient/wbc_idmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nsswitch/libwbclient/wbc_idmap.c b/nsswitch/libwbclient/wbc_idmap.c
index ad3cfe6770..5325dbe5ce 100644
--- a/nsswitch/libwbclient/wbc_idmap.c
+++ b/nsswitch/libwbclient/wbc_idmap.c
@@ -372,10 +372,10 @@ wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids,
break;
default:
id->type = WBC_ID_TYPE_NOT_SPECIFIED;
- q = p;
+ q = strchr(p, '\n');
break;
};
- if (q[0] != '\n') {
+ if (q == NULL || q[0] != '\n') {
goto wbc_err_invalid;
}
p = q+1;