diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tkColor.c | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,9 @@ 2009-12-09 Donal K. Fellows <dkf@users.sf.net> + * generic/tkColor.c (Tk_GetColorByValue): [Bug 2911570]: Ensure that + hash keys of color values are zeroed first, so that they hash properly + on 64-bit systems (where X structures are not tightly packed). + * unix/tkUnixWm.c (TkpMakeMenuWindow): Improve the determining of what * generic/tkMenu.c (ConfigureMenu): EWMH hint to use so that we distinguish between dropdown menus (children of menubars) and what are diff --git a/generic/tkColor.c b/generic/tkColor.c index ccd46e7..2035ec4 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkColor.c,v 1.21 2009/11/21 17:24:42 dkf Exp $ + * RCS: @(#) $Id: tkColor.c,v 1.22 2009/12/09 22:41:52 dkf Exp $ */ #include "tkInt.h" @@ -301,8 +301,11 @@ Tk_GetColorByValue( /* * First, check to see if there's already a mapping for this color name. + * Must clear the structure first; it's not tightly packed on 64-bit + * systems. [Bug 2911570] */ + memset(&valueKey, 0, sizeof(ValueKey)); valueKey.red = colorPtr->red; valueKey.green = colorPtr->green; valueKey.blue = colorPtr->blue; |