wsprintf is broken by design and never writes more than 1024 characters

Change-Id: I791e55bb5d98ee82c01271dcebafa7c4672cd424
(cherry picked from commit 50bd5c11f551f5274be9a4411c5ddcbd32bd9a03)
Reviewed-on: https://gerrit.libreoffice.org/6930
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>