summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-06-06 20:22:55 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-06-06 20:22:55 (GMT)
commit274946bac908c5520729223647320fb2c25e8a1d (patch)
treea1aaa48dbc956cfad861e96b698841bcf60131ef /generic/tkMenu.c
parent36ecdb06871a56957e1ccb3b2b42fcf80a6884b0 (diff)
parentd784654c95274c471e4319ed0d7e42adaceac453 (diff)
downloadtk-274946bac908c5520729223647320fb2c25e8a1d.zip
tk-274946bac908c5520729223647320fb2c25e8a1d.tar.gz
tk-274946bac908c5520729223647320fb2c25e8a1d.tar.bz2
Fix [a418aafa76]: Bogus @x,y indices are accepted for menu entries.
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r--generic/tkMenu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index b4c6473..fbf4e33 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -2956,10 +2956,13 @@ GetIndexFromCoords(
x = y;
p = end + 1;
y = strtol(p, &end, 0);
- if (end == p) {
+ if ((end == p) || (*end != '\0')) {
goto error;
}
} else {
+ if (*end != '\0') {
+ goto error;
+ }
x = borderwidth;
}