diff options
author | fvogel <fvogelnew1@free.fr> | 2023-05-28 17:44:45 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-05-28 17:44:45 (GMT) |
commit | d784654c95274c471e4319ed0d7e42adaceac453 (patch) | |
tree | e3d59725c8250e0aea401e2c5de5cdaabad84f37 | |
parent | 4f7885d3768a84582efcd239f221a0ebedd70435 (diff) | |
download | tk-d784654c95274c471e4319ed0d7e42adaceac453.zip tk-d784654c95274c471e4319ed0d7e42adaceac453.tar.gz tk-d784654c95274c471e4319ed0d7e42adaceac453.tar.bz2 |
Fix [a418aafa76]: Bogus @x,y indices are accepted for menu entries. Testcases added in the previous commit do pass now.
-rw-r--r-- | generic/tkMenu.c | 5 |
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; } |