From 61c734fd81af6418add306dbc99d89d42f5fba7f Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Sun, 15 Jul 2018 22:57:20 +0100 Subject: [PATCH] ensure __cwd is terminated --- nx/source/runtime/devices/fs_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nx/source/runtime/devices/fs_dev.c b/nx/source/runtime/devices/fs_dev.c index a5b3c31e..ae5d3478 100644 --- a/nx/source/runtime/devices/fs_dev.c +++ b/nx/source/runtime/devices/fs_dev.c @@ -1047,6 +1047,7 @@ fsdev_chdir(struct _reent *r, if (__cwd[__cwd_len-1] != '/' && __cwd_len < PATH_MAX) { __cwd[__cwd_len] = '/'; + __cwd[__cwd_len+1] = '\0'; } fsdev_fsdevice_cwd = device->id;