diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-03-08 10:08:39 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-03-08 19:18:58 +0100 |
commit | a6c69b18cbf19dc43092b0ae23758a83471357a8 (patch) | |
tree | 20c8ac5a18494171e2850d6a4bf733446f4c7f18 /lib | |
parent | 160b971f6cf9e2b92eb07b8e6a56e3d5a99dc9ea (diff) |
fs: fix readlink() return value
The fs.readlink() function incorrectly produced a JSON string containing
trailing null bytes.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -442,7 +442,7 @@ uc_fs_readlink(uc_vm *vm, size_t nargs) } while (true); - res = json_object_new_string_len(buf, buflen); + res = json_object_new_string_len(buf, rv); free(buf); |