Bug #96074 mysqldump werror=format-truncation

Submitted: 2 Jul 2019 11:48 Modified: 12 Jul 2019 18:27
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.18 OS:Any
Assigned to: CPU Architecture:Any

[2 Jul 2019 11:48] Tor Didriksen
Description:
client/mysqldump.cc: In function void dump_table(char*, char*):
client/mysqldump.cc:3891:16: error: %s directive output may be truncated writing up to 194 bytes into a region of size 169 [-Werror=format-truncation=]
client/mysqldump.cc:3538:36:
   result_table = quote_name(table, table_buff, 1);
                                    ~~~~~~~~~~
client/mysqldump.cc:3891:16:
                "%s: Error %d: %s when dumping table %s at row: %ld\n",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
client/mysqldump.cc:3891:16: note: using the range [-9223372036854775808, 9223372036854775807] for directive argument
client/mysqldump.cc:3890:15: note: snprintf output 43 or more bytes (assuming 237) into a destination of size 200

How to repeat:
Linux ellex07 4.18.0-32.el8.aarch64 #1 SMP Thu Mar 28 15:54:26 PDT 2019 aarch64 aarch64 aarch64 GNU/Linux

$cat /etc/os-release 
NAME="Oracle Linux Server"
VERSION="8.0"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.0"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.0"

cmake <path to source> -DMYSQL_MAINTAINER_MODE=1
make mysqldmp

Suggested fix:
Larger 'buf' is needed.
[12 Jul 2019 18:27] Paul DuBois
Posted by developer:
 
Fixed in 8.0.18.

A mysqldump error-message buffer was too small, potentially leading
to message truncation.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.