diff options
Diffstat (limited to 'c_implementation/src')
-rw-r--r-- | c_implementation/src/ak_fs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/c_implementation/src/ak_fs.c b/c_implementation/src/ak_fs.c index 148f0ca..d8e8e87 100644 --- a/c_implementation/src/ak_fs.c +++ b/c_implementation/src/ak_fs.c @@ -296,7 +296,9 @@ int ak_fs_cat_file_from_root_hash(sha512sum* rh) FILE *fd; char *fullpath; bool is_chunk = false; - if ( asprintf(&fullpath, "%s/%s", leafs_dir, ak_fs_sha512sum_struct_read_as_string(rh)) == -1 ) return -1; + char root_hash_str[129] = {0}; + ak_fs_sha512sum_struct_to_string(rh, root_hash_str); + if ( asprintf(&fullpath, "%s/%s", leafs_dir, root_hash_str) == -1 ) return -1; fd = fopen(fullpath, "r"); if ( fd == NULL ) { |