mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Use snprintf() instead of sprintf() to avoid buffer overflow. Also change the integer type from signed to unsigned. Error: dasdinfo.c: In function 'dinfo_create_devnode': dasdinfo.c:297:52: warning: '%04d' directive writing between 4 and 11 bytes into a region of size 5 [-Wformat-overflow=] 297 | sprintf(filename, "dasdinfo%04d", retry); | ^~~~ Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Jan Polensky <japo@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>