X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/2452116398c5dd458fbd14f320c3c59e74eaa83e..80be023065ced106a4078a36371c135a60d2bd6c:/mp-mem.c diff --git a/mp-mem.c b/mp-mem.c index 0ce7a20..5d345a0 100644 --- a/mp-mem.c +++ b/mp-mem.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mp-mem.c,v 1.5 2001/06/16 12:57:00 mdw Exp $ + * $Id: mp-mem.c,v 1.8 2004/04/08 16:17:32 mdw Exp $ * * Memory management for multiprecision numbers * @@ -27,29 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: mp-mem.c,v $ - * Revision 1.5 2001/06/16 12:57:00 mdw - * Implement some missing functions. - * - * Revision 1.4 2001/02/03 12:00:29 mdw - * Now @mp_drop@ checks its argument is non-NULL before attempting to free - * it. Note that the macro version @MP_DROP@ doesn't do this. - * - * Revision 1.3 2000/06/17 11:45:09 mdw - * Major memory management overhaul. Added arena support. Use the secure - * arena for secret integers. Replace and improve the MP management macros - * (e.g., replace MP_MODIFY by MP_DEST). - * - * Revision 1.2 1999/12/10 23:19:02 mdw - * Improve error-checking. - * - * Revision 1.1 1999/11/17 18:02:16 mdw - * New multiprecision integer arithmetic suite. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -288,7 +265,7 @@ mp *mp_dest(mp *m, size_t sz, unsigned f) /* --- Otherwise check whether the destination is suitable --- */ if (m->ref > 1 || (m->f & MP_CONST) || - m->sz > len || !((f & ~m->f) & MP_BURN)) { + sz > m->sz || ((f & ~m->f) & MP_BURN)) { /* --- No -- allocate a new buffer --- * *