[Date Prev][Date Next]
Default values for SB_MAX_INCOMING_* are wrong (ITS#1828)
Full_Name: Iustin Pop
Version: up to 2.0.23
Submission from: (NULL) (188.8.131.52)
The default values, located in servers/slapd/proto-slap.h:
#define SLAP_SB_MAX_INCOMING_DEFAULT (1<<18 - 1)
SLAP_SB_MAX_INCOMING_AUTH (1<<24 - 1)
are wrong, since the '<<' operator has lower priority than '-' operator. Thus,
the effective values are 1<<17 and 1<<23 (verified using gdb while debbuging),
which conflict with the manual page, which says 262143, respectively 4194303;
these values correspond to (1<<18)-1 and (1<<22)-1.
Also, it seems clear (from the formatting of the macro) that the developer
intended to say (1<<18) - 1, but since OpenLDAP code is not compiled by default
with '-Wall' the warning was not caught.
Fix is trivial :)