Don't underflow malloc'd memory in hdb_fix_dn()

This commit is contained in:
Howard Chu 2009-05-01 04:26:44 +00:00
parent 43f219d752
commit c7142fdec5

View file

@ -529,8 +529,8 @@ int hdb_fix_dn(
} }
} }
BEI(e)->bei_modrdns = max; BEI(e)->bei_modrdns = max;
ptr[-1] = '\0'; if ( ptr > e->e_name.bv_val ) ptr[-1] = '\0';
nptr[-1] = '\0'; if ( nptr > e->e_nname.bv_val ) nptr[-1] = '\0';
return 0; return 0;
} }