Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-09-23 18:43:39 +0300
committerGitHub <noreply@github.com>2019-09-23 18:43:39 +0300
commit27b6cc829bcf0aa6f01f13240e0b9f70427652c2 (patch)
treed6b749b7a2b2da3337b5a3f60aeef2a5cfa346ef /tests
parentfd204ac2fb4e05ffce6db6d1be67e0342c267cd7 (diff)
Fixed off-by-one null terminator in testsfix-max-null-tests
Found by mr-at-eo
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_paths.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_paths.sh b/tests/test_paths.sh
index f720e39..cfdcd98 100755
--- a/tests/test_paths.sh
+++ b/tests/test_paths.sh
@@ -179,7 +179,7 @@ echo "--- Really big path test ---"
scripts/test.py << TEST
lfs_mount(&lfs, &cfg) => 0;
memset(path, 'w', LFS_NAME_MAX);
- path[LFS_NAME_MAX+1] = '\0';
+ path[LFS_NAME_MAX] = '\0';
lfs_mkdir(&lfs, path) => 0;
lfs_remove(&lfs, path) => 0;
lfs_file_open(&lfs, &file, path,
@@ -189,7 +189,7 @@ scripts/test.py << TEST
memcpy(path, "coffee/", strlen("coffee/"));
memset(path+strlen("coffee/"), 'w', LFS_NAME_MAX);
- path[strlen("coffee/")+LFS_NAME_MAX+1] = '\0';
+ path[strlen("coffee/")+LFS_NAME_MAX] = '\0';
lfs_mkdir(&lfs, path) => 0;
lfs_remove(&lfs, path) => 0;
lfs_file_open(&lfs, &file, path,