summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkClassicTheme.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/ttkClassicTheme.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/ttkClassicTheme.c')
-rw-r--r--generic/ttk/ttkClassicTheme.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index e2f3651..94178a5 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkClassicTheme.c,v 1.6 2007/12/13 15:26:26 dgp Exp $
+ * $Id: ttkClassicTheme.c,v 1.7 2008/07/04 19:05:04 jenglish Exp $
*
* Copyright (c) 2004, Joe English
*
@@ -228,17 +228,15 @@ static void ArrowElementDraw(
{
int direction = *(int *)clientData;
ArrowElement *arrow = elementRecord;
- Tk_3DBorder border;
- int borderWidth;
+ Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, arrow->borderObj);
+ int borderWidth = 2;
int relief = TK_RELIEF_RAISED;
- int size;
+ int size = b.width < b.height ? b.width : b.height;
XPoint points[3];
Tk_GetPixelsFromObj(NULL, tkwin, arrow->borderWidthObj, &borderWidth);
- border = Tk_Get3DBorderFromObj(tkwin, arrow->borderObj);
Tk_GetReliefFromObj(NULL, arrow->reliefObj, &relief);
- size = b.width < b.height ? b.width : b.height;
/*
* @@@ There are off-by-one pixel errors in the way these are drawn;