Silence warning about unsafe sprintf, use snprintf instead


Apple Clang, and clang also complains about this, and warnings like this
tend to break the unity build in certain situation. So, if possible, I
rather address them.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I8e24267a1ebfc0c3ff4f2f8afdcb7c6aed62db80
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
commita8d90a776ead891b8eedf25979c6ef4cccb6fe49
parentb41f852e16f78c093805bd17f410ea483e6e7939
authorAmir Masoud Abdol <amir.abdol@qt.io>
committerAmir Masoud Abdol <amir.abdol@qt.io>
commit timeThu, 13 Apr 2023 14:14:10 +0200