diff options
| author | Felix Fietkau | 2025-08-03 04:16:42 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2025-08-03 04:16:44 +0000 |
| commit | b563d7b2e65a756e02c579f51e3ca0211f741050 (patch) | |
| tree | 83272e14241336f6d69ba8371dc0832739223937 | |
| parent | 74c22601baad83cc9bc0fddb98f15d7abaa52c67 (diff) | |
| download | netifd-b563d7b2e65a756e02c579f51e3ca0211f741050.tar.gz | |
ucode: add missing return code checks for fchdir/chdir
Fixes build issue on glibc
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | ucode.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -333,10 +333,12 @@ uc_netifd_start_process(uc_value_t *dir, uc_value_t *arg, uc_value_t *env, int * break; fallthrough; case UC_INTEGER: - fchdir(ucv_int64_get(dir)); + if (fchdir(ucv_int64_get(dir)) < 0) + exit(1); break; case UC_STRING: - chdir(ucv_string_get(dir)); + if (chdir(ucv_string_get(dir)) < 0) + exit(1); break; default: break; |