X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Futils.cpp;h=0f6e0362f2d32f6c557ffede0341ed0d829b2ff7;hb=51a7b11ec8712e8888af09cc3d3df3bb848f70e9;hp=831926aab16c48656082113a984386d530be3203;hpb=40b2a4a793c81221a28f822d07135069456ea021;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); /*