projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use @va_arg@ as an argument to @STORE32@!
[u/mdw/catacomb]
/
bbs-rand.c
diff --git
a/bbs-rand.c
b/bbs-rand.c
index
dbca23c
..
abe1e72
100644
(file)
--- a/
bbs-rand.c
+++ b/
bbs-rand.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: bbs-rand.c,v 1.
3 2000/06/17 10:45:21
mdw Exp $
+ * $Id: bbs-rand.c,v 1.
4 2001/02/03 12:00:29
mdw Exp $
*
* Blum-Blum-Shub secure random number generator
*
*
* Blum-Blum-Shub secure random number generator
*
@@
-30,6
+30,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: bbs-rand.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: bbs-rand.c,v $
+ * 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 10:45:21 mdw
* Typesetting fixes. Advertise random number generator strength. Use
* secure arena for memory allocation.
* Revision 1.3 2000/06/17 10:45:21 mdw
* Typesetting fixes. Advertise random number generator strength. Use
* secure arena for memory allocation.
@@
-134,8
+138,7
@@
void bbs_step(bbs *b)
void bbs_set(bbs *b, mp *x)
{
void bbs_set(bbs *b, mp *x)
{
- if (b->x)
- mp_drop(b->x);
+ mp_drop(b->x);
b->x = MP_COPY(x);
bbs_step(b);
}
b->x = MP_COPY(x);
bbs_step(b);
}