summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkClassicTheme.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-07-04 19:06:02 (GMT)
committerjenglish <jenglish@flightlab.com>2008-07-04 19:06:02 (GMT)
commit2522c1a958eb895f1e4d576207c643353960ee56 (patch)
treecdbb2a1f76fc7db31e619a48557007d96f1744bc /generic/ttk/ttkClassicTheme.c
parentfded95f4e881432bcd0b9bb27baf0aad2ad99be9 (diff)
downloadtk-2522c1a958eb895f1e4d576207c643353960ee56.zip
tk-2522c1a958eb895f1e4d576207c643353960ee56.tar.gz
tk-2522c1a958eb895f1e4d576207c643353960ee56.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..f71ca30 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.6.2.1 2008/07/04 19:06:03 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;