Commit 65631088 authored by Pere Mato Vila's avatar Pere Mato Vila
Browse files

Added a patch to the proper usage og realpath()

parent f580d88c
Pipeline #3153908 passed with stage
in 12 minutes and 38 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