[Date Prev][Date Next]
(ITS#6101) Uninitialized SlapReply components
Full_Name: Hallvard B Furuseth
Version: HEAD, RE24
Submission from: (NULL) (220.127.116.11)
Submitted by: hallvard
The sru_search and sru_extended components of SlapReply.sr_un are
commonly used uninitialized. When a union is initialized, only
the first union member (sru_sasl) is initialized. Compilers may
but need not fill the rest with something.
One partial fix would be to make sru_search the first union element,
That's the most commonly used member and also the biggest, so
initializing it is likely to help for other cases as well.
Whether or not we do that, in connection.c:connection_operation(),
the switch ( tag ) can initialize the uninitialized members, all
but one of LDAP_REQ_BIND, LDAP_REQ_SEARCH, and/or LDAP_REQ_EXTENDED.
We need to check
grep -nH -e 'SlapReply[<tab> ]*[a-zA-Z]' *.c */*.c
for other cases.