From: Hallvard Furuseth Date: Mon, 4 Jul 2005 05:18:01 +0000 (+0000) Subject: Don't do pointer arithmetic on void* X-Git-Tag: OPENLDAP_AC_BP~463 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cc0d91716e8b0447800cfeda70f478aa6d106ae7;p=openldap Don't do pointer arithmetic on void* --- diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index 2c2ef30e51..89bfae0ebf 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -670,7 +670,7 @@ hdb_dn2id( rc = DB_NOTFOUND; } if ( rc == 0 ) { - ptr = data.data + data.size - sizeof(ID); + ptr = (char *) data.data + data.size - sizeof(ID); BDB_DISK2ID( ptr, &ei->bei_id ); ei->bei_rdn.bv_len = data.size - sizeof(diskNode) - nrlen; ptr = d->nrdn + nrlen + 1; @@ -731,7 +731,7 @@ hdb_dn2id_parent( rc = LDAP_OTHER; } else { db_recno_t dkids; - ptr = data.data + data.size - sizeof(ID); + ptr = (char *) data.data + data.size - sizeof(ID); BDB_DISK2ID( ptr, idp ); ei->bei_nrdn.bv_len = (d->nrdnlen[0] << 8) | d->nrdnlen[1]; ber_str2bv( d->nrdn, ei->bei_nrdn.bv_len, 1, &ei->bei_nrdn );