From 5d9a90aa1eb03973daff1aee8fa4eadd7a37b45b Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 10 May 2005 18:54:10 +0000 Subject: Fixed uninitialized memory read in tclBinary.c when passing a NaN to 'd','q','Q' formats --- ChangeLog | 6 ++++++ generic/tclBinary.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0f13031..ca964be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-05-10 Kevin Kenny + * 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 + 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; } /* -- cgit v0.12