Skip to content

Commit

Permalink
Merge pull request #294 from ARMmbed/fix-max-null-tests
Browse files Browse the repository at this point in the history
Fixed off-by-one null terminator in tests
  • Loading branch information
geky authored Oct 15, 2019
2 parents 7ae8d77 + 27b6cc8 commit 4ebe603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 4ebe603

Please sign in to comment.