[rtems-libbsd commit] rtemsbsd/syscall: Set unitialised variable in open
Chris Johns
chrisj at rtems.org
Wed Aug 9 13:30:32 UTC 2023
Module: rtems-libbsd
Branch: 6-freebsd-12
Commit: fdde806c50ab2f70ef40ba061c5f216aac5bfe0f
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=fdde806c50ab2f70ef40ba061c5f216aac5bfe0f
Author: Chris Johns <chrisj at rtems.org>
Date: Sun Aug 6 15:45:21 2023 +1000
rtemsbsd/syscall: Set unitialised variable in open
The open path length was not set when at the root node and this
sometimes failed the current directory checks.
---
rtemsbsd/rtems/rtems-bsd-syscall-api.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/rtemsbsd/rtems/rtems-bsd-syscall-api.c b/rtemsbsd/rtems/rtems-bsd-syscall-api.c
index 81361e94..800aa323 100644
--- a/rtemsbsd/rtems/rtems-bsd-syscall-api.c
+++ b/rtemsbsd/rtems/rtems-bsd-syscall-api.c
@@ -918,6 +918,7 @@ rtems_bsd_sysgen_open_node(
if (rtems_bsd_libio_loc_to_vnode(&iop->pathinfo) ==
rtems_bsd_libio_loc_to_vnode(rootloc)) {
opath = ".";
+ opathlen = 1;
} else {
opath = path + strlen(path);
opathlen = 0;
More information about the vc
mailing list