diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index fa16c1383a8..4669b8dba59 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -223,7 +223,7 @@ static NTSTATUS idmap_autorid_id_to_sid(struct autorid_global_config *cfg, map->status = ID_UNKNOWN; return NT_STATUS_OK; } - if (q != NULL) + if ((q != NULL) && (*q != '\0')) if (sscanf(q+1, "%"SCNu32, &domain_range_index) != 1) { DEBUG(10, ("Domain range index not found, " "ignoring mapping request\n"));