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