Skip to content
Commit b0cd07bf authored by Greg V's avatar Greg V
Browse files

quirks: use basename in a POSIX compliant way

The POSIX version of basename modifies the string (and therefore crashes
on static strings), so use safe_strdup before calling it.

glibc provides a POSIX version when libgen.h is included.
FreeBSD 12 provides a POSIX version when nothing is included, which was
causing a segfault.

Using the POSIX version correctly is the right way to avoid any such issues.
parent 430ede82
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment