mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Get rid of fixed buffers and avoid the following GCC8 compile warnings:
lszcrypt.c: In function ‘main’:
lszcrypt.c:642:28: warning: ‘%04x’ directive writing between 4 and 8
bytes into a region of size between 7 and 13 [-Wformat-overflow=]
sprintf(sub_dev, "%02x.%04x", id, dom);
^~~~
lszcrypt.c:642:22: note: directive argument in the range [0, 2147483647]
sprintf(sub_dev, "%02x.%04x", id, dom);
^~~~~~~~~~~
lszcrypt.c:642:5: note: ‘sprintf’ output between 8 and 18 bytes into a
destination of size 16
sprintf(sub_dev, "%02x.%04x", id, dom);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>