http://bugzilla.suse.com/show_bug.cgi?id=1066090
http://bugzilla.suse.com/show_bug.cgi?id=1066090#c2
Bin Liu changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags|needinfo?(bliu@suse.com) |
--- Comment #2 from Bin Liu ---
Hi, is this what you want?
sam.c: In function ‘sam_cmap_update_key’:
sam.c:155:46: warning: ‘%s’ directive output may be truncated writing 8 bytes
into a region of size between 1 and 255 [-Wformat-truncation=]
snprintf(key_name, CMAP_KEYNAME_MAXLEN, "%s%s",
sam_internal_data.cmap_pid_path,
^~
"recovery");
~~~~~~~~~~
sam.c:155:3: note: ‘snprintf’ output between 9 and 263 bytes into a destination
of size 255
snprintf(key_name, CMAP_KEYNAME_MAXLEN, "%s%s",
sam_internal_data.cmap_pid_path,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"recovery");
the code is as following:
char key_name[CMAP_KEYNAME_MAXLEN];
switch (key) {
case SAM_CMAP_KEY_RECOVERY:
svalue = ssvalue[SAM_RP_MASK
(sam_internal_data.recovery_policy)];
snprintf(key_name, CMAP_KEYNAME_MAXLEN, "%s%s",
sam_internal_data.cmap_pid_path,
"recovery");
you can find the code at[1]
[1]https://build.opensuse.org/package/show/home:BinLiu/corosync-master
--
You are receiving this mail because:
You are on the CC list for the bug.