Fix uninitialised memory use when reading gz files


Calling hasSvgHeader with destination is wrong since not all of
destination may have been filled with data and thus there's random
things at the end.

Use only the first zlibStream.total_out of destination.

Pick-to: 6.10 6.9
Change-Id: I91b16cf521d36accecc748633a85787f2a9db2b6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commit2831714161272d808dfbbc0197939fd2c234ba8c
parent7b384a8c20b95c88c54750f044dde80a3ca1f204
authorAlbert Astals Cid <aacid@kde.org>
committerAlbert Astals Cid <aacid@kde.org>
commit timeFri, 3 Oct 2025 17:32:51 +0200