Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnmtoimage can't read conformant pgm/pnm files. #440

Open
gcode-importer opened this issue Nov 22, 2014 · 2 comments
Open

pnmtoimage can't read conformant pgm/pnm files. #440

gcode-importer opened this issue Nov 22, 2014 · 2 comments
Assignees

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 440

pnmtoimage can't read conformant pgm/pnm files according to http://netpbm.sourceforge.net/doc/pgm.html
specification.

Issue 294 only partially solve the issue.


Reported by mayeut on 2014-11-22 14:22:14

@gcode-importer
Copy link
Author

Could you please be a little more specific ? Thx

Reported by malaterre on 2015-01-07 16:41:52

@gcode-importer
Copy link
Author

before r2942,

OpenJPEG failed to read data/baseline/conformance/a6_mono_colr_0.pgm

head -2 data/baseline/conformance/a6_mono_colr_0.pgm
P5
3323 891 255

Because it was expecting
P5
3323 891
255

The issue has been corrected for this specific PNM header disposition

A conforming header could be like :
P5 3323 891 255
Or
P5 3323
891 255
Or
...

In those cases, OpenJPEG would fail to read the file.

Reported by mayeut on 2015-01-07 17:12:49

mayeut added a commit to mayeut/openjpeg that referenced this issue Sep 21, 2016
Malformed PNM file could cause a crash in opj_compress.
Checks were added to prevent this.

Fixes uclouvain#843
Updates uclouvain#440
mayeut added a commit that referenced this issue Sep 21, 2016
Malformed PNM file could cause a crash in opj_compress.
Checks were added to prevent this.

Fixes #843
Updates #440
malaterre pushed a commit that referenced this issue Sep 22, 2016
Malformed PNM file could cause a crash in opj_compress.
Checks were added to prevent this.

Fixes #843
Updates #440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants