From: Howard Chu Date: Sun, 10 Mar 2019 14:21:48 +0000 (+0000) Subject: ITS#8989 fix bitshift integer overflow X-Git-Tag: OPENLDAP_REL_ENG_2_4_48~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e671a75f64b0a884eaf320b79adcdda30c1b8926;p=thirdparty%2Fopenldap.git ITS#8989 fix bitshift integer overflow --- diff --git a/servers/slapd/back-mdb/id2entry.c b/servers/slapd/back-mdb/id2entry.c index 08cac2af6d..6682d91407 100644 --- a/servers/slapd/back-mdb/id2entry.c +++ b/servers/slapd/back-mdb/id2entry.c @@ -568,7 +568,7 @@ static int mdb_entry_partsize(struct mdb_info *mdb, MDB_txn *txn, Entry *e, return 0; } -#define HIGH_BIT (1<<(sizeof(unsigned int)*CHAR_BIT-1)) +#define HIGH_BIT (1U<<(sizeof(unsigned int)*CHAR_BIT-1)) /* Flatten an Entry into a buffer. The buffer starts with the count of the * number of attributes in the entry, the total number of values in the