Hi,
please fix the implementation in first patch and then add test in second. Currently the tests are using garbage data from stack causing random failures: file.c:2419: Test failed: expected read-only file file.c:2441: Test succeeded inside todo block: expected rw file
Thanks, Piotr