MDEV-34340: MariaDB backup fail on NetBSD

If argv0 is null to my_get_exe then don't
let the fallback in my_realpath handle this.

This was the cause of the original SEGV on NetBSD
so we don't want this to be the path for any
unimplemented ports of this function.
This commit is contained in:
Daniel Black 2024-09-24 10:12:02 +10:00
parent 171c4aa479
commit f9f1d26f2a

View file

@ -53,5 +53,7 @@ int my_get_exepath(char *buf, size_t size, const char *argv0)
}
#endif
return my_realpath(buf, argv0, 0);
if (argv0)
return my_realpath(buf, argv0, 0);
return 1;
}