Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
3.1, 3.3
Description
When building optimized ASAN builds, using GCC 11.4:
/test/preview-11.3-preview_opt_san/libmariadb/plugins/auth/my_auth.c:153:5: error: 'strncpy' output may be truncated copying
|
511 bytes from a string of length 511 [-Werror=stringop-truncation]
|
153 | strncpy(last_error, ((MCPVIO_EXT *)vio)->mysql->net.last_error,
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
154 | sizeof(last_error) - 1);
|
| ~~~~~~~~~~~~~~~~~~~~~~~
|
/test/preview-11.3-preview_opt_san/libmariadb/plugins/auth/my_auth.c:170:5: error: 'strncpy' output may be truncated copying
|
511 bytes from a string of length 511 [-Werror=stringop-truncation]
|
170 | strncpy(mysql->net.last_error, last_error,
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
171 | sizeof(mysql->net.last_error) - 1);
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
May be present in other versions too.