diff options
| author | Kevin B Kenny <kennykb@acm.org> | 2005-05-10 18:54:10 (GMT) |
|---|---|---|
| committer | Kevin B Kenny <kennykb@acm.org> | 2005-05-10 18:54:10 (GMT) |
| commit | fd22173a409c34a56f586411b394a4249bba897e (patch) | |
| tree | e076b1457473c433aadfe4debc4f612d1c32cbfa | |
| parent | 925330a28892b1bcc0ddb2bf9546023bbfcb9114 (diff) | |
| download | tcl-fd22173a409c34a56f586411b394a4249bba897e.zip tcl-fd22173a409c34a56f586411b394a4249bba897e.tar.gz tcl-fd22173a409c34a56f586411b394a4249bba897e.tar.bz2 | |
Fixed uninitialized memory read in tclBinary.c when passing a NaN to 'd','q','Q' formats
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | generic/tclBinary.c | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,11 @@ 2005-05-10 Kevin Kenny <kennykb@acm.org> + * tclBinary.c (FormatNumber): Fixed a bug where NaN's + resulted in reads of uninitialized memory when using 'd', + 'q', or 'Q' format. + +2005-05-10 Kevin Kenny <kennykb@acm.org> + Merged all changes on kennykb-numerics-branch back into the HEAD. TIP's 132 and 232 are now Final. diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 706d1f0..fa75841 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.22 2005/05/10 18:34:07 kennykb Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.23 2005/05/10 18:54:31 kennykb Exp $ */ #include "tclInt.h" @@ -1632,6 +1632,7 @@ FormatNumber(interp, type, src, cursorPtr) if ( src->typePtr != &tclDoubleType ) { return TCL_ERROR; } + dvalue = src->internalRep.doubleValue; } /* |
