Additional issues:
smc.c: In function ‘build_element_descriptors’:
smc.c:164:41: error: ‘__builtin___snprintf_chk’ output truncated before the
last format character [-Werror=format-truncation=]
snprintf((char *)&data[i], 32, "%-32s", s->volume_tag);
^
In file included from /usr/include/stdio.h:862:0,
from smc.c:32:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note:
‘__builtin___snprintf_chk’ output 33 bytes into a destination of size 32
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
smc.c:166:41: error: ‘__builtin___snprintf_chk’ output truncated before the
last format character [-Werror=format-truncation=]
snprintf((char *)&data[i], 32, "%-32s", s->barcode);
^
In file included from /usr/include/stdio.h:862:0,
from smc.c:32:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note:
‘__builtin___snprintf_chk’ output 33 bytes into a destination of size 32
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe the size of the volume_tag element should be increased to 33
bytes.
smc.c:184:40: error: ‘%-10s’ directive output may be truncated writing between
10 and 36 bytes into a region of size 11 [-Werror=format-truncation=]
snprintf((char *)&data[i + 28], 11, "%-10s", attr->scsi_sn);
^~~~~
In file included from /usr/include/stdio.h:862:0,
from smc.c:32:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note:
‘__builtin___snprintf_chk’ output between 11 and 37 bytes into a destination of
size 11
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scsi_sn is defined as 36 bytes long (+1 byte for termination). Question
is whether truncation here would be accidental or desired...
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1723055
Title:
Artful: Fix FTBS on test-rebuild-20170922
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tgt/+bug/1723055/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs