1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/plugin
Alexander Barkov 9a1123dc45 MDEV-41556 Unexpected error: Incorrect ASSOCIATIVE ARRAY KEY value
my_strntoull10rnd_8bit() did not set *error when a signed negative value
was exactly LONGLONG_MIN (-9223372036854775808): that path returned the
value and left *error untouched. Callers passing an uninitialized
"int error", such as the associative array key conversion in
Type_handler_assoc_array, then read a garbage value and raised a
spurious ER_WRONG_VALUE. Field_num::get_int() and Field_year::store()
also pass an uninitialized error, and my_strntoull10rnd_mb2_or_mb4()
calls this function too.

Fix: initialize *error to 0 at function entry, like the sibling
my_strntoll_8bit() and my_strntoll_mb2_or_mb4() do, so that no exit
path can leave it unset.

The bug was introduced by commit 031f11717d (Fix all warnings given by
UBSAN, 2021-04-18), which started skipping the *error assignment when
the value equals LONGLONG_MIN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 16:00:34 +04:00
..
2026-05-26 21:15:58 +02:00
2024-12-02 17:51:17 +02:00
2025-08-03 15:01:09 +02:00
2024-05-27 12:39:02 +02:00
2026-01-31 14:08:54 +01:00
2026-08-19 11:28:01 +02:00
2025-04-22 16:26:36 -04:00
2026-05-08 08:11:03 +02:00
2026-02-09 20:55:41 +01:00
2026-02-09 20:55:41 +01:00
2024-01-18 19:22:23 +02:00
2025-04-18 17:11:01 +02:00
2026-08-20 08:27:14 +02:00