Harden the MacHeif & MacJp2 handlers
- Respect QImageReader::allocationLimit()
- Avoid hypothetical qint64 overflow when seeking (harmless: would
wrap to negative number which would just be rejected)
- Avoid potentially huge allocation when reading from serial devices
(i.e. not files or data buffers)
- Avoid int overflow and garbage dpm values for nonsensical dpi
metadata
Task-number: QTBUG-148333
Pick-to: 6.12 6.11 6.8 6.5 5.15
Change-Id: I1aecb807858c314655d009cc2630fb8ea0718117
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>