Skip to content

Commit

Permalink
[common] make sure string is null terminated
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Jul 25, 2019
1 parent bdac44c commit 2a4a1af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libknet/common.c
Expand Up @@ -108,6 +108,7 @@ static void *open_lib(knet_handle_t knet_h, const char *libname, int extra_flags
log_debug(knet_h, KNET_SUB_COMMON, "Unable to readlink %s: %s", path, strerror(errno));
goto out;
}
link[sizeof(link) - 1] = 0;
/*
* symlink is relative to the directory
*/
Expand Down

0 comments on commit 2a4a1af

Please sign in to comment.