Skip to content

Commit 5b72e95

Browse files
committed
MDEV-37600 fixup: GCC 15 -Wunterminated-string-initialization
1 parent 5cf9d84 commit 5b72e95

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugin/auth_mysql_sha2/sha256crypt.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ void sha256_crypt_r(const unsigned char *key, size_t key_len,
2929
unsigned char tmp[SHA256_DIGEST_LENGTH];
3030
unsigned char alt[SHA256_DIGEST_LENGTH];
3131
size_t cnt;
32-
static const char b64t[64] =
33-
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
32+
static const char b64t[64]
33+
#if defined __GNUC__ && __GNUC__ > 7
34+
__attribute__((nonstring))
35+
#endif
36+
= "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
3437
void *ctx = alloca(my_sha256_context_size());
3538
unsigned char *p_bytes = alloca(key_len);
3639
unsigned char *s_bytes = alloca(salt_len);

0 commit comments

Comments
 (0)