mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-22387: Do not violate __attribute__((nonnull))
This follows up commit commit94a520ddbeand 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:
parent
d2fab68667
commit
8036d0a359
22 changed files with 89 additions and 48 deletions
|
|
@ -534,8 +534,11 @@ static inline int my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
|
|||
{
|
||||
if (info->write_pos + Count <= info->write_end)
|
||||
{
|
||||
memcpy(info->write_pos, Buffer, Count);
|
||||
info->write_pos+= Count;
|
||||
if (Count)
|
||||
{
|
||||
memcpy(info->write_pos, Buffer, Count);
|
||||
info->write_pos+= Count;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return _my_b_write(info, Buffer, Count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue