Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245545 - media-libs/jasper-1.900.1-r2: errors reading image
Summary: media-libs/jasper-1.900.1-r2: errors reading image
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Kursawe (RETIRED)
Depends on:
Blocks: CVE-2008-3520
  Show dependency tree
Reported: 2008-11-04 18:01 UTC by Martin von Gagern
Modified: 2008-12-10 10:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2008-11-04 18:01:04 UTC
r2 of media-libs/jasper-1.900.1 has introduced some kind of regression. This leads to failure to read certain images.

Steps to reproduce:
$ wget\
$ imginfo -f 0055.jp2

Expected result (as of jasper-1.900.1-r1):
jp2 3 2538 3832 8 29176848

Actual result (with jasper-1.900.1-r2):
error: cannot decode code stream
cannot load image

Other applications that use jasper, such as imagemagick convert, are affected as well.
Comment 1 Martin von Gagern 2008-11-04 18:54:30 UTC
This line here from the patch is to blame:

snprintf(obj->pathname, L_tmpnam, "%stmp.XXXXXXXXXX", P_tmpdir);

This line comes from the "fix" for CVE-2008-3521.
gdb shows a resulting string of "/tmptmp.XXXXXXXXXX", so I assume P_tmpdir is set to "/tmp" without trailing slash. Adding a slash after the %s solves the issue.

As bug 222819 comment 24 seems to indicate that CVE-2008-3521 isn't really an issue, we might even drop this change altogether. Up to you.
Comment 2 Patrick Kursawe (RETIRED) gentoo-dev 2008-12-08 21:00:43 UTC
I joined all current fixes, waiting for the mirrors to get the patch. -r3 will solve this issue. Stay tuned...
Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2008-12-10 10:45:15 UTC
Just committed, fixed in -r3. Thank you!