X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Futils.c;h=729aa76f9fd161ddeefbafc19db6374e3da14e54;hp=0494b23bdcd0bd356f45c0f4f8c5bf8a0f99c871;hb=c30ce0b3d524a2c15bc688356d50d38fa9b43f85;hpb=2f77fc4b3720dc8f75847130498c2d4aad7c03ec diff --git a/src/common/utils.c b/src/common/utils.c index 0494b23bd..729aa76f9 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -70,7 +70,7 @@ char *utils_expand_path(const char *path) } /* Add end part to expanded path */ - strncat(expanded_path, end_path, PATH_MAX); + strncat(expanded_path, end_path, PATH_MAX - strlen(expanded_path) - 1); free(cut_path); return expanded_path;