diff options
author | jenglish <jenglish@flightlab.com> | 2008-07-04 19:06:02 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2008-07-04 19:06:02 (GMT) |
commit | 98b92227c91db9953bfadbc7ecc94e42b112e670 (patch) | |
tree | cdbb2a1f76fc7db31e619a48557007d96f1744bc /generic/ttk/ttkClassicTheme.c | |
parent | 7c8f30c254e7e1a4c10c3cb0e9e99170b3c2a01e (diff) | |
download | tk-98b92227c91db9953bfadbc7ecc94e42b112e670.zip tk-98b92227c91db9953bfadbc7ecc94e42b112e670.tar.gz tk-98b92227c91db9953bfadbc7ecc94e42b112e670.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.c | 10 |
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; |