mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 03:17:56 +08:00
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.
This commit is contained in:
@@ -918,6 +918,7 @@ rtems_bsd_sysgen_open_node(
|
|||||||
if (rtems_bsd_libio_loc_to_vnode(&iop->pathinfo) ==
|
if (rtems_bsd_libio_loc_to_vnode(&iop->pathinfo) ==
|
||||||
rtems_bsd_libio_loc_to_vnode(rootloc)) {
|
rtems_bsd_libio_loc_to_vnode(rootloc)) {
|
||||||
opath = ".";
|
opath = ".";
|
||||||
|
opathlen = 1;
|
||||||
} else {
|
} else {
|
||||||
opath = path + strlen(path);
|
opath = path + strlen(path);
|
||||||
opathlen = 0;
|
opathlen = 0;
|
||||||
|
Reference in New Issue
Block a user