This commit is contained in:
Nick Chan committed 2023-02-04 21:42:25 +08:00
1 parent f22bee6870
commit 42a47d656c
2 files changed
+4 -6

No files matched your search

+2 -2
View File
@@ -52,7 +52,7 @@ jobs:
- name: Download dependencies (source code)
run: |
curl -LOOOOOOO \
curl -LOOOOOO \
https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${{ env.MBEDTLS_VERSION }}.tar.gz \
https://github.com/libusb/libusb/releases/download/v${{ env.LIBUSB_VERSION }}/libusb-${{ env.LIBUSB_VERSION }}.tar.bz2 \
https://mirror-hk.koddos.net/gnu/readline/readline-${{ env.READLINE_VERSION }}.tar.gz \
@@ -451,7 +451,7 @@ jobs:
- name: Download dependencies (source code)
run: |
curl -LOOOOOOOO \
curl -LOOOOOOO \
https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${{ env.MBEDTLS_VERSION }}.tar.gz \
https://github.com/libusb/libusb/releases/download/v${{ env.LIBUSB_VERSION }}/libusb-${{ env.LIBUSB_VERSION }}.tar.bz2 \
https://mirror-hk.koddos.net/gnu/readline/readline-${{ env.READLINE_VERSION }}.tar.gz \
+2 -4
View File
@@ -30,10 +30,8 @@ int exec_checkra1n() {
checkra1n_path = ext_checkra1n;
goto checkra1n_exec;
}
if (getenv("TMPDIR") != NULL) {
checkra1n_path = malloc(strlen(getenv("TMPDIR")) + 20);
snprintf(checkra1n_path, strlen(getenv("TMPDIR")) + 20, "%s/checkra1n.XXXXXX", getenv("TMPDIR"));
} else checkra1n_path = "/tmp/checkra1n.XXXXXX";
checkra1n_path = malloc(strlen(getenv("TMPDIR")) + 20);
snprintf(checkra1n_path, strlen(getenv("TMPDIR")) + 20, "%s/checkra1n.XXXXXX", getenv("TMPDIR") != NULL ? getenv("TMPDIR") : "/tmp");
fd = mkstemp(checkra1n_path);
if (fd == -1) {
LOG(LOG_FATAL, "Cannot open temporary file: %d (%s)", errno, strerror(errno));