From: Felix Fietkau Date: Sun, 3 Aug 2025 04:16:42 +0000 (+0200) Subject: ucode: add missing return code checks for fchdir/chdir X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=b563d7b2e65a756e02c579f51e3ca0211f741050;p=project%2Fnetifd.git ucode: add missing return code checks for fchdir/chdir Fixes build issue on glibc Signed-off-by: Felix Fietkau --- diff --git a/ucode.c b/ucode.c index a1b67f5..fdddab7 100644 --- a/ucode.c +++ b/ucode.c @@ -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;