1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
mariadb/sql/sql_time.h
Daniel Black ecf1555da7 MDEV-40147 MSAN: use-of-uninitialized-value in my_time_compare
Field::get_date and Item::get_date can return true and not
have their ltime pointer structure initialized.

This was the case with Field_vers_trx_id::get_date.

Type_handler_time_common::stored_field_cmp_to_item rather
than doing a my_time_compare on uninitialized values can
return a non-equality (!=0) value for when the fetching of
Field or Item fails and avoid the call to my_time_compare.

Added checks for other invalid results before being
passed to my_time_compare.

Add nonnull as an attribute on my_time_compare and the
unpack_time function it used. Also pack_time since related
and it obviously requires a non-null argument.

Reviewed by: Alexey Midenkov
2026-07-20 17:04:39 +10:00

8.3 KiB