Skip to content

Commit 4c5e1f1

Browse files
committed
BUG#36421684: mysql server 8.3.0 heap-buffer-overflow at Multisource_info::get_mi
When using JSON fuctions as a parameter to a SOURCE_POS_WAIT/MASTER_POS_WAIT, something that should also apply to other functions that return text results, the string extracted from the parameter did not have a safe pointer to it. The cause is that the length of the string was not properly marked inside its allocated space. Usage of the method c_ptr_safe fixes this issue. Change-Id: Ic2c54999293aa2e0833594754ad681d7453e03a1
1 parent c9b6926 commit 4c5e1f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/item_func.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
1+
/* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -4912,7 +4912,7 @@ longlong Item_master_pos_wait::val_int()
49124912
return 0;
49134913
}
49144914

4915-
mi= channel_map.get_mi(channel_str->ptr());
4915+
mi = channel_map.get_mi(channel_str->c_ptr_safe());
49164916

49174917
}
49184918
else

0 commit comments

Comments
 (0)