mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-22387: Do not violate __attribute__((nonnull))
This follows up commit commit94a520ddbe
and commit7c5519c12d
. After these changes, the default test suites on a cmake -DWITH_UBSAN=ON build no longer fail due to passing null pointers as parameters that are declared to never be null, but plenty of other runtime errors remain.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/* Copyright (c) 2002-2007 MySQL AB & tommy@valley.ne.jp
|
||||
Copyright (c) 2002, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2014, SkySQL Ab.
|
||||
Copyright (c) 2009, 2020, MariaDB Corporation.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
@ -399,7 +399,7 @@ my_strnxfrm_8bit_bin(CHARSET_INFO *cs,
|
||||
{
|
||||
set_if_smaller(srclen, dstlen);
|
||||
set_if_smaller(srclen, nweights);
|
||||
if (dst != src)
|
||||
if (srclen && dst != src)
|
||||
memcpy(dst, src, srclen);
|
||||
return my_strxfrm_pad_desc_and_reverse(cs, dst, dst + srclen, dst + dstlen,
|
||||
(uint)(nweights - srclen), flags, 0);
|
||||
|
Reference in New Issue
Block a user