Commit 824a7c3
committed
pnm: rewrite PAM header decoder
The new decoding logic does not require any unbounded length allocations.
Behavioral changes:
* The decoder now rejects leading + on numbers, to match PNM.
* The length of custom TUPLTYPEs now has a hard limit. This does not
affect realistic images, and PnmDecoder only accepts a short list of
known TUPLTYPEs anyway. (Without a hard limit, the PAM header
decoding logic would require memory limits to be specified in
advance.)1 parent bf4ace6 commit 824a7c3
1 file changed
+539
-90
lines changed
0 commit comments