1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/client
Daniel Black e4bdee5a0d MDEV-36453 UBSAN: main.mysqltest - runtime error: null pointer
..passed as argument 2, which is declared to never be null
(dynstr_append_mem).

dynstr_append_mem, uses memcpy to append to the string which in the glibc
library is declared to not take null string as the src. Defensively we
declare dynstr_append_mem to not take a null argument too.

mariadb-test, to prevent it calling dynstr_append_mem with a null
mtr variable value, one that hasn't been initialized, we return an
error if the value is null. The result of this is the $6 in the test
case is never assigned a value and would error.

With this resolved, strchr, if the string isn't found, a null pointer is
returned. UBSAN will complain both about incrementing a pointer beyond
the boundary, and also incrementing if it is null.
2026-05-04 17:30:39 +10:00
..
2024-05-10 20:02:18 +02:00
2020-11-03 16:24:47 +02:00
2019-05-11 21:29:06 +03:00
2022-08-09 18:41:09 +03:00
2026-04-20 11:07:30 +03:00
2024-05-10 20:02:18 +02:00
2025-05-21 07:36:35 +03:00