mariadb/storage/xtradb/log
Marko Mäkelä b761211685 MDEV-18659: Fix string truncation/overflow in InnoDB and XtraDB
Fix the warnings issued by GCC 8 -Wstringop-truncation
and -Wstringop-overflow in InnoDB and XtraDB.

This work is motivated by Jan Lindström. The patch mainly differs
from his original one as follows:

(1) We remove explicit initialization of stack-allocated string buffers.
The minimum amount of initialization that is needed is a terminating
NUL character.
(2) GCC issues a warning for invoking strncpy(dest, src, sizeof dest)
because if strlen(src) >= sizeof dest, there would be no terminating
NUL byte in dest. We avoid this problem by invoking strncpy() with
a limit that is 1 less than the buffer size, and by always writing
NUL to the last byte of the buffer.
(3) We replace strncpy() with memcpy() or strcpy() in those cases
when the result is functionally equivalent.

Note: fts_fetch_index_words() never deals with len==UNIV_SQL_NULL.
This was enforced by an assertion that limits the maximum length
to FTS_MAX_WORD_LEN. Also, the encoding that InnoDB uses for
the compressed fulltext index is not byte-order agnostic, that is,
InnoDB data files that use FULLTEXT INDEX are not portable between
big-endian and little-endian systems.
2019-03-06 11:22:27 +02:00
..
log0crypt.cc MDEV-14874 innodb_encrypt_log corrupts the log when the LSN crosses 32-bit boundary 2018-01-08 09:44:40 +02:00
log0log.cc MDEV-17003 service_manager_extend_timeout() being called too often 2018-08-21 12:33:40 +03:00
log0online.cc MDEV-18659: Fix string truncation/overflow in InnoDB and XtraDB 2019-03-06 11:22:27 +02:00
log0recv.cc MDEV-14705: slow innodb startup/shutdown can exceed systemd timeout 2018-04-06 09:58:14 +03:00