summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2015-07-07 15:20:34 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2015-07-07 15:20:34 (GMT)
commit9b3015adad89ada0c26a09882ae2eddc4405263f (patch)
tree234f2a5686eb3afbb6554edd16a746909cf60425
parent5e24158640337db102df0cb9cb15c34b0b8ceb7b (diff)
downloadtk-9b3015adad89ada0c26a09882ae2eddc4405263f.zip
tk-9b3015adad89ada0c26a09882ae2eddc4405263f.tar.gz
tk-9b3015adad89ada0c26a09882ae2eddc4405263f.tar.bz2
Fix for [805cffb017fde5ba]: segfault via Tk_ConfigureWidget
-rw-r--r--generic/tkOldConfig.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index 97ad5cb..d7a33f7 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -112,6 +112,10 @@ Tk_ConfigureWidget(
specs = GetCachedSpecs(interp, specs);
+ for (specPtr = specs; specPtr->type != TK_CONFIG_END; specPtr++) {
+ specPtr->specFlags &= ~TK_CONFIG_OPTION_SPECIFIED;
+ }
+
/*
* Pass one: scan through all of the arguments, processing those that
* match entries in the specs.
@@ -167,7 +171,6 @@ Tk_ConfigureWidget(
if ((specPtr->specFlags & TK_CONFIG_OPTION_SPECIFIED)
|| (specPtr->argvName == NULL)
|| (specPtr->type == TK_CONFIG_SYNONYM)) {
- specPtr->specFlags &= ~TK_CONFIG_OPTION_SPECIFIED;
continue;
}
if (((specPtr->specFlags & needFlags) != needFlags)
@@ -1128,7 +1131,6 @@ GetCachedSpecs(
specPtr->defValue = Tk_GetUid(specPtr->defValue);
}
}
- specPtr->specFlags &= ~TK_CONFIG_OPTION_SPECIFIED;
}
} else {
cachedSpecs = (Tk_ConfigSpec *) Tcl_GetHashValue(entryPtr);