X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Futils.cpp;h=0f6e0362f2d32f6c557ffede0341ed0d829b2ff7;hb=053c50e3f707d781c7a502c75f8294b3d9bb7e6e;hp=831926aab16c48656082113a984386d530be3203;hpb=cd9adb8b829564212158943a0d279bb35322ab30;p=lttng-tools.git diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 831926aab..0f6e0362f 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -1032,7 +1032,7 @@ int utils_show_help(int section, const char *page_name, const char *help_msg) } /* Section integer -> section string */ - ret = sprintf(section_string, "%d", section); + ret = snprintf(section_string, sizeof(section_string), "%d", section); LTTNG_ASSERT(ret > 0 && ret < 8); /*