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 | 2522c1a958eb895f1e4d576207c643353960ee56 (patch) | |
tree | cdbb2a1f76fc7db31e619a48557007d96f1744bc /generic/ttk/ttkElements.c | |
parent | fded95f4e881432bcd0b9bb27baf0aad2ad99be9 (diff) | |
download | tk-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/ttkElements.c')
-rw-r--r-- | generic/ttk/ttkElements.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 78d314d..648bbc4 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -1,4 +1,4 @@ -/* $Id: ttkElements.c,v 1.10 2007/12/13 15:26:26 dgp Exp $ +/* $Id: ttkElements.c,v 1.10.2.1 2008/07/04 19:06:03 jenglish Exp $ * * Copyright (c) 2003, Joe English * @@ -957,7 +957,7 @@ static void SliderElementDraw( { SliderElement *slider = elementRecord; Tk_3DBorder border = NULL; - int relief, borderWidth, orient; + int relief = TK_RELIEF_RAISED, borderWidth = 2, orient; border = Tk_Get3DBorderFromObj(tkwin, slider->borderObj); Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); @@ -1043,7 +1043,7 @@ static void PbarElementSize( int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { PbarElement *pbar = elementRecord; - int orient, thickness, length, borderWidth; + int orient, thickness = 15, length = 30, borderWidth = 2; Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, pbar->thicknessObj, &thickness); @@ -1068,7 +1068,7 @@ static void PbarElementDraw( { PbarElement *pbar = elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, pbar->borderObj); - int relief, borderWidth; + int relief = TK_RELIEF_RAISED, borderWidth = 2; Tk_GetPixelsFromObj(NULL, tkwin, pbar->borderWidthObj, &borderWidth); Tk_GetReliefFromObj(NULL, pbar->reliefObj, &relief); |