Commit 3039449a authored by Pere Mato Vila's avatar Pere Mato Vila
Browse files

Merge branch 'SPI-2009' into 'master'

MySQL: added a patch to the proper usage of realpath()

Closes SPI-2009

See merge request !981
parents aed8a415 65631088
Pipeline #3156897 passed with stage
in 56 seconds
......@@ -18,3 +18,23 @@
@@ -34 +34 @@
- FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
+ FILE (STRINGS ${CMAKE_SOURCE_DIR}/MYSQL_VERSION str REGEX "^[ ]*${keyword}=")
--- libmariadb/mariadb_config/mariadb_config.c.in.orig 2021-10-22 10:39:12.000000000 +0200
+++ libmariadb/mariadb_config/mariadb_config.c.in 2021-10-22 10:42:49.000000000 +0200
@@ -161,12 +161,13 @@
else {
#if defined(__APPLE__)
unsigned int len= PATH_MAX;
- if (_NSGetExecutablePath(p, &len) != 0)
+ char* np = alloca(PATH_MAX);
+ if (_NSGetExecutablePath(np, &len) != 0)
*p= 0;
else
{
- p[len]= 0;
- if (realpath(p, p) != 0)
+ np[len]= 0;
+ if (realpath(np, p) == NULL)
*p= 0;
}
#elif defined(__sun) || defined(SOLARIS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment