From fdde806c50ab2f70ef40ba061c5f216aac5bfe0f Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sun, 6 Aug 2023 15:45:21 +1000 Subject: [PATCH] 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;