utsname fields too short on some PowerPC BSPs (qoriq, mpc55xx)
Joel Sherrill
joel at rtems.org
Mon Jun 12 19:26:09 UTC 2017
Hi
The following BSPs have a new warning for a writing too much with
snprintf():
powerpc-mpc5566evb_spe
powerpc-mpc5674f_ecu508_app
powerpc-mpc5674f_ecu508_boot
powerpc-mpc5674fevb_spe
powerpc-mpc5674f_rsm6
powerpc-phycore_mpc5554
powerpc-qoriq_core_0
powerpc-qoriq_core_1
powerpc-qoriq_p1020rdb
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/utsname.c:56:55:
warning: '%s' directive output truncated writing 29 bytes into a region of
size 24 [-Wformat-truncation=]
The code is:
snprintf( name->machine, sizeof(name->machine), "%s/%s", CPU_NAME,
CPU_MODEL_NAME );
The fields are 32 bytes. Does anyone see a problem with increasing them to
48?
--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170612/63a94824/attachment.html>
More information about the devel
mailing list