mariadb/storage/connect
Monty eef94c9d46 MDEV-36248 Connect crashes server because of duplicate 'free()' in GetUser
If connect engineis not able to allocate connect_work_space memory for
GetUser() it will call free() twice with the same value (g).

g was freed first in user_connect::user_init() which calls PlugExit() on
errors and then again in ~user_connect() which also calls PlugExit().

Fixed by setting g to 0 in user_init() after calling PlugExit()
This code was tested 'by hand' by setting connect.work_space=600G

Other things:
- Removed some very old not relevant comments in touched code
- Added comments to clarify how some memory was freed
- Fixed indentation in changed functions.
2025-03-09 16:01:53 +02:00
..
mysql-test/connect Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
.gitignore
ApacheInterface.java
array.cpp Minimize unsafe C functions usage - replace strcat() and strcpy() (and strncat() and strncpy()) with custom safe_strcat() and safe_strcpy() functions 2023-01-20 15:18:52 +02:00
array.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
blkfil.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
blkfil.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
block.h Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
bson.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
bson.h Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
bsonudf.cpp Merge branch '10.5' into 10.6 2023-08-01 15:08:52 +02:00
bsonudf.h Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
catalog.h MDEV-30713 field length handling for CONNECT engine 2023-04-21 15:47:53 +01:00
checklvl.h
Client.java
Client2.java - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
Client3.java - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
CMakeLists.txt Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
cmgfam.cpp - Major update of the json/bson/mongo table types programs. 2021-05-01 22:29:38 +02:00
cmgfam.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
cmgoconn.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
cmgoconn.h - Mongo defined columns 2021-05-24 16:56:12 +02:00
colblk.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
colblk.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
connect.cc MDEV-36248 Connect crashes server because of duplicate 'free()' in GetUser 2025-03-09 16:01:53 +02:00
connect.h Pull new version from origin 2020-03-12 19:16:36 +01:00
csort.cpp
csort.h Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
domdoc.cpp enforce no trailing \n in Diagnostic_area messages 2025-01-07 16:31:39 +01:00
domdoc.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
encas.h
engmsg.h
enids.h
filamap.cpp Merge branch '10.3' into 10.4 2022-07-27 11:02:57 +02:00
filamap.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
filamdbf.cpp Removed compiler warning from connect/filamdbf.cpp 2023-09-05 19:36:58 +03:00
filamdbf.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
filamfix.cpp Merge branch '10.3' into 10.4 2023-01-28 18:22:55 +01:00
filamfix.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
filamgz.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
filamgz.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
filamtxt.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
filamtxt.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
filamvct.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
filamvct.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
filamzip.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
filamzip.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
filter.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
filter.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
fmdlex.c Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
global.h Use memory safe snprintf() in Connect Engine and elsewhere () 2022-09-28 15:45:25 +01:00
ha_connect.cc Merge branch '10.5' into 10.6 2024-10-09 08:38:48 +02:00
ha_connect.h Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
inihandl.cpp Merge 10.4 into 10.5 2021-10-13 12:33:56 +03:00
inihandl.h
ioapi.c clang15 warnings - unused vars and old prototypes 2023-01-10 17:10:43 +00:00
ioapi.h Merge branch 10.4 into 10.5 2024-05-06 13:55:42 +02:00
javaconn.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
javaconn.h - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
jdbccat.h
JdbcInterface.java
jdbconn.cpp Merge branch '10.5' into 10.6 2023-08-01 15:08:52 +02:00
jdbconn.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
jmgfam.cpp - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
jmgfam.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
jmgoconn.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
jmgoconn.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
json.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
json.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
jsonudf.cpp Merge branch '10.5' into 10.6 2023-08-01 15:08:52 +02:00
jsonudf.h Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
libdoc.cpp MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
libdoc.h
macutil.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
macutil.h - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
maputil.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
maputil.h Fix compile error on LINUX (LARGE_INTEGER) 2020-11-03 23:19:22 +01:00
MariadbInterface.java
messages.h Remove unused French translations in Connect engine () 2023-05-19 13:21:34 +01:00
mini-global.h
mongo.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
mongo.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
Mongo2Interface.java - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
Mongo3Interface.java - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
msgid.h
mycat.cc Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
mycat.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
myconn.cpp Merge branch '10.5' into 10.6 2023-01-31 09:31:42 +01:00
myconn.h - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
MysqlInterface.java
myutil.cpp MDEV-29782 CONNECT YEAR type conversion fix 2023-02-21 17:55:01 +00:00
myutil.h - Make possible to allocate work space larger than 4GB 2020-10-01 19:18:26 +02:00
noconst.c MDEV-25602 Eliminate the rest of __WIN__ in Connect 2021-08-05 11:32:41 +02:00
odbccat.h
odbconn.cpp Fixed compiler warnings in connect/odbconn.cpp 2023-10-08 22:48:27 +03:00
odbconn.h - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
OracleInterface.java
os.h - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
osutil.c Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
osutil.h
plgcnx.h
plgdbsem.h Remove unused French translations in Connect engine () 2023-05-19 13:21:34 +01:00
plgdbutl.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
plgodbc.h
plgxml.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
plgxml.h
plugutil.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
PostgresqlInterface.java
preparse.h
rcmsg.c Remove unused French translations in Connect engine () 2023-05-19 13:21:34 +01:00
rcmsg.h
reldef.cpp Merge 10.5 into 10.6 2023-04-25 13:10:33 +03:00
reldef.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
resource.h
rest.def
restget.cpp
tabbson.cpp Merge branch '10.4' into 10.5 2023-04-24 12:43:47 +02:00
tabbson.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabcmg.cpp - Make user variable prefix recognized by IsArgJson and IsJson 2021-07-24 16:28:57 +02:00
tabcmg.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabcol.cpp
tabcol.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabdos.cpp Merge branch '10.4' into 10.5 2023-04-24 12:43:47 +02:00
tabdos.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabext.cpp Trivial fixes: 2024-01-23 13:03:12 +02:00
tabext.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabfix.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
tabfix.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabfmt.cpp Fixed connect to not call strlen() over and over again in a loop 2024-10-16 17:24:46 +03:00
tabfmt.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabjdbc.cpp Merge branch '10.4' into 10.5 2023-04-24 12:43:47 +02:00
tabjdbc.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabjmg.cpp Fix Connect compile issue 2023-05-15 09:22:26 +01:00
tabjmg.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabjson.cpp Merge 10.5 into 10.6 2023-04-25 13:10:33 +03:00
tabjson.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
table.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
tabmac.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
tabmac.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabmul.cpp Check and remove high stack usage 2024-04-23 14:12:31 +03:00
tabmul.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabmysql.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
tabmysql.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
taboccur.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
taboccur.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabodbc.cpp Merge branch '10.4' into 10.5 2022-10-02 14:38:13 +02:00
tabodbc.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabpivot.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
tabpivot.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabrest.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
tabrest.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabsys.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
tabsys.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabtbl.cpp clang15 warnings - unused vars and old prototypes 2023-01-10 17:10:43 +00:00
tabtbl.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabutil.cpp Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
tabutil.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabvct.cpp MDEV-8941 Compile on Solaris (SPARC) fails with errors in filamvct.cpp 2024-01-10 13:48:23 +11:00
tabvct.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabvir.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
tabvir.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabwmi.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
tabwmi.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabxcl.cpp Merge branch '10.4' into 10.5 2021-07-31 23:19:51 +02:00
tabxcl.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabxml.cpp Merge branch '10.5' into 10.6 2023-08-01 15:08:52 +02:00
tabxml.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
tabzip.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
tabzip.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
TestInsert2.java - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
TestInsert3.java - Fix MDEV-25863 : Replace __WIN__ by _WIN32 2021-06-08 17:44:43 +02:00
unzip.c Merge branch 'merge-zlib' (1.3.1) into 10.4 2024-04-26 13:50:03 +02:00
unzip.h Merge branch 'merge-zlib' (1.3.1) into 10.4 2024-04-26 13:50:03 +02:00
user_connect.cc MDEV-36248 Connect crashes server because of duplicate 'free()' in GetUser 2025-03-09 16:01:53 +02:00
user_connect.h
valblk.cpp Merge branch '10.3' into 10.4 2022-10-01 23:07:26 +02:00
valblk.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
value.cpp Fix insecure use of strcpy, strcat and sprintf in Connect 2023-05-12 15:37:00 +01:00
value.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
xindex.cpp Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
xindex.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
xobject.cpp Use memory safe snprintf() in Connect Engine 2022-07-26 16:28:59 +10:00
xobject.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
xtable.h MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
zip.c Merge branch '10.5' into 10.6 2024-05-08 20:06:00 +02:00
zip.h Merge branch 'merge-zlib' (1.3.1) into 10.4 2024-04-26 13:50:03 +02:00