summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkClamTheme.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-07-04 19:05:03 (GMT)
committerjenglish <jenglish@flightlab.com>2008-07-04 19:05:03 (GMT)
commit71beb13aef5469536491f6d9377e151d077720a5 (patch)
tree8bf612256385f9fb1bc7fd15c467c7a4368808c6 /generic/ttk/ttkClamTheme.c
parent2ae7f2cdd395b7ff0ad3bfa144c8d71cc9fbc346 (diff)
downloadtk-71beb13aef5469536491f6d9377e151d077720a5.zip
tk-71beb13aef5469536491f6d9377e151d077720a5.tar.gz
tk-71beb13aef5469536491f6d9377e151d077720a5.tar.bz2
Audit: ensure that output arguments to Tk_Get*FromObj() are initialized,
in case of erroneous style specifications [#2009213].
Diffstat (limited to 'generic/ttk/ttkClamTheme.c')
-rw-r--r--generic/ttk/ttkClamTheme.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index cabdef3..cde8ef7 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkClamTheme.c,v 1.9 2007/12/13 15:26:26 dgp Exp $
+ * $Id: ttkClamTheme.c,v 1.10 2008/07/04 19:05:04 jenglish Exp $
*
* Copyright (C) 2004 Joe English
*
@@ -487,7 +487,7 @@ static void GripElementSize(
{
int horizontal = *((Ttk_Orient*)clientData) == TTK_ORIENT_HORIZONTAL;
GripElement *grip = elementRecord;
- int gripCount;
+ int gripCount = 0;
Tcl_GetIntFromObj(NULL, grip->gripCountObj, &gripCount);
if (horizontal) {
@@ -506,8 +506,8 @@ static void GripElementDraw(
GripElement *grip = elementRecord;
GC lightGC = Ttk_GCForColor(tkwin,grip->lightColorObj,d);
GC darkGC = Ttk_GCForColor(tkwin,grip->borderColorObj,d);
- int gripPad = 1;
- int i, gripCount;
+ int gripPad = 1, gripCount = 0;
+ int i;
Tcl_GetIntFromObj(NULL, grip->gripCountObj, &gripCount);
@@ -614,7 +614,7 @@ static void ThumbElementDraw(
Drawable d, Ttk_Box b, unsigned state)
{
ScrollbarElement *sb = elementRecord;
- int gripCount = 3, orient = TTK_ORIENT_HORIZONTAL;
+ int gripCount = 0, orient = TTK_ORIENT_HORIZONTAL;
GC lightGC, darkGC;
int x1, y1, x2, y2, dx, dy, i;
const int w = WIN32_XDRAWLINE_HACK;