diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2014-02-07 20:08:10 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2014-02-07 20:08:10 +0000 |
| commit | ec4c32a8921fc72e855f2ca8ec608af499dc34d2 (patch) | |
| tree | 18c646a52a842b7a24acfc7acbaeb25ad09aeba2 /src/extension/internal/image-resolution.cpp | |
| parent | Slightly improved fix to previous check-in. (diff) | |
| download | inkscape-ec4c32a8921fc72e855f2ca8ec608af499dc34d2.tar.gz inkscape-ec4c32a8921fc72e855f2ca8ec608af499dc34d2.zip | |
Fix for Bug #1275443 (Including picture results in crash).
Fixed bugs:
- https://launchpad.net/bugs/1275443
(bzr r13006)
Diffstat (limited to 'src/extension/internal/image-resolution.cpp')
| -rw-r--r-- | src/extension/internal/image-resolution.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/extension/internal/image-resolution.cpp b/src/extension/internal/image-resolution.cpp index aee46aaba..18eb97f80 100644 --- a/src/extension/internal/image-resolution.cpp +++ b/src/extension/internal/image-resolution.cpp @@ -322,6 +322,12 @@ void ImageResolution::readjfif(char const *fn) { y_ = cinfo.Y_density * 2.54; ok_ = true; } + /* According to http://www.jpeg.org/public/jfif.pdf (page 7): + * "Xdensity and Ydensity should always be non-zero". + * but in some cases, they are (see LP bug #1275443) */ + if (x_ == 0 or y_ == 0) { + ok_ = false; + } } jpeg_destroy_decompress(&cinfo); fclose(ifd); |
