[Date Prev][Date Next] [Chronological] [Thread] [Top]

Missing error codes in slapd/backglue.c:glue_back_search() (ITS#1675)

Full_Name: Hallvard B. Furuseth
Version: 2.1.0alpha
OS: Linux
Submission from: (NULL) (

If scope != LDAP_SCOPE_BASE and a timelimit or sizelimit is exceeded,
rc is returned uninitialized and something (gs.err?) should be set to
LDAP_<TIME/SIZE>LIMIT_EXCEEDED.  Or maybe it should only be set to
*LIMIT_EXCEEDED if there is not a "stronger" error there already.
Though it only pays attention to the _last_ result code in any case;
that seems strange.

Also, rc is returned uninitialized if scope != LDAP_SCOPE_BASE and
there is no backend with a be->be_search routine.

BTW, after fixing this, you'll get rid of a gcc 'variable might
be used uninitialized' warning if you replace the switch with an
`if (scope == LDAP_SCOPE_BASE) ... else ...' statement.