Reject truncated and corrupt ascii pnm images
In contrast to the binary decoder code, the ascii decoder would not abort and fail on premature end of file.
Pick-to: 6.2 6.2.2 5.15 5.12 5.12.12
Change-Id: If27bce0afa8d1de6c4dbeb2bc0e623c1dcc2f1e0
Reviewed-by: Volker Hilsheimer volker.hilsheimer@qt.io
(cherry picked from commit 997c052d)