mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 08:39:37 -05:00
ITS#6831 fix filter comparison
This commit is contained in:
parent
123506788b
commit
aaac401dc8
1 changed files with 19 additions and 0 deletions
|
|
@ -1251,6 +1251,11 @@ filter_first( Filter *f )
|
|||
return f;
|
||||
}
|
||||
|
||||
typedef struct fstack {
|
||||
struct fstack *fs_next;
|
||||
Filter *fs_fs;
|
||||
Filter *fs_fi;
|
||||
} fstack;
|
||||
|
||||
static CachedQuery *
|
||||
find_filter( Operation *op, Avlnode *root, Filter *inputf, Filter *first )
|
||||
|
|
@ -1262,6 +1267,7 @@ find_filter( Operation *op, Avlnode *root, Filter *inputf, Filter *first )
|
|||
int ret, rc, dir;
|
||||
Avlnode *ptr;
|
||||
CachedQuery cq, *qc;
|
||||
fstack *stack = NULL, *fsp;
|
||||
|
||||
cq.filter = inputf;
|
||||
cq.first = first;
|
||||
|
|
@ -1339,6 +1345,12 @@ nextpass: eqpass = 1;
|
|||
case LDAP_FILTER_AND:
|
||||
fs = fs->f_and;
|
||||
fi = fi->f_and;
|
||||
/* save our stack position */
|
||||
fsp = op->o_tmpalloc(sizeof(fstack), op->o_tmpmemctx);
|
||||
fsp->fs_next = stack;
|
||||
fsp->fs_fs = fs->f_next;
|
||||
fsp->fs_fi = fi->f_next;
|
||||
stack = fsp;
|
||||
res=1;
|
||||
break;
|
||||
case LDAP_FILTER_SUBSTRINGS:
|
||||
|
|
@ -1386,6 +1398,13 @@ nextpass: eqpass = 1;
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (!fs && !fi && stack) {
|
||||
fsp = stack;
|
||||
stack = fsp->fs_next;
|
||||
fs = fsp->fs_fs;
|
||||
fi = fsp->fs_fi;
|
||||
op->o_tmpfree(fsp, op->o_tmpmemctx);
|
||||
}
|
||||
} while((res) && (fi != NULL) && (fs != NULL));
|
||||
|
||||
if ( res )
|
||||
|
|
|
|||
Loading…
Reference in a new issue