Get address sanitizer mostly working

This commit is contained in:
Justine Tunney 2020-09-03 05:44:37 -07:00
parent 1f1f3cd477
commit 7327c345f9
149 changed files with 3777 additions and 3457 deletions

View file

@ -218,11 +218,11 @@ static void ReadAll(int fd, void *buf, size_t n) {
static void LoadImageOrDie(const char *path, size_t size, long yn, long xn,
unsigned char RGB[yn][xn][4]) {
int pid, ws, fds[3];
const char *convert;
char *convert, pathbuf[PATH_MAX];
if (isempty((convert = getenv("CONVERT"))) &&
!(IsWindows() && access((convert = "\\msys64\\mingw64\\bin\\convert.exe"),
X_OK) != -1) &&
!(convert = commandv("convert"))) {
!(convert = commandv("convert", pathbuf))) {
fputs("'convert' command not found\r\n"
"please install imagemagick\r\n",
stderr);