=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/packet.c,v retrieving revision 1.236 retrieving revision 1.237 diff -u -r1.236 -r1.237 --- src/usr.bin/ssh/packet.c 2016/09/06 09:22:56 1.236 +++ src/usr.bin/ssh/packet.c 2016/09/12 01:22:38 1.237 @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.236 2016/09/06 09:22:56 markus Exp $ */ +/* $OpenBSD: packet.c,v 1.237 2016/09/12 01:22:38 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,7 +37,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include /* MIN roundup */ #include #include #include @@ -1058,7 +1057,7 @@ else *max_blocks = ((u_int64_t)1 << 30) / enc->block_size; if (state->rekey_limit) - *max_blocks = MIN(*max_blocks, + *max_blocks = MINIMUM(*max_blocks, state->rekey_limit / enc->block_size); debug("rekey after %llu blocks", (unsigned long long)*max_blocks); return 0; @@ -1101,7 +1100,7 @@ return 1; /* Rekey after (cipher-specific) maxiumum blocks */ - out_blocks = roundup(outbound_packet_len, + out_blocks = ROUNDUP(outbound_packet_len, state->newkeys[MODE_OUT]->enc.block_size); return (state->max_blocks_out && (state->p_send.blocks + out_blocks > state->max_blocks_out)) || @@ -1229,7 +1228,7 @@ if (state->extra_pad) { tmp = state->extra_pad; state->extra_pad = - roundup(state->extra_pad, block_size); + ROUNDUP(state->extra_pad, block_size); /* check if roundup overflowed */ if (state->extra_pad < tmp) return SSH_ERR_INVALID_ARGUMENT;