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

Corruption of MIFF files created from sources with curly braces in comment metadata #368

Closed
njdoyle opened this issue Jan 30, 2017 · 2 comments

Comments

@njdoyle
Copy link
Contributor

njdoyle commented Jan 30, 2017

If an image is input to ImageMagick with curly braces in it's text comment metadata then MIFF files may be corrupted when output.

Here's a command that demonstrates the problem:
convert logo: -set text 'CommentWith{curly}braces.' PNG:- | convert PNG:- MIFF:- | convert MIFF:- logo.png

This command creates a PNG file with a text comment containing curly braces, converts it to a MIFF file, and then converts it back to a PNG file for viewing.

The command produces warnings and, for me, produces corrupted image data.

This has been happening for a while and can be confirmed to be a problem on version 7.0.4-6.

@urban-warrior
Copy link
Member

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Feb 5, 2017
2017-02-04  7.0.4-7 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.4-7, GIT revision 19513:5783e57:20170204.

2017-01-28  7.0.4-7 Cristy  <quetzlzacatenango@image...>
  * Sanitize comments that include braces for the MIFF image format (reference
    ImageMagick/ImageMagick#368).

2017-01-27  7.0.4-7 Glenn Randers-Pehrson <glennrp@image...>
  * coders/png.c: Added support for a proposed new PNG chunk
    (zxIf, read-only) that is currently being discussed on the
    png-mng-misc at lists.sourceforge.net mailing list.  Enable
    exIf and zxIf with CPPFLAGS="-DexIf_SUPPORTED -DxzIf_SUPPORTED".
    If exIf is enabled, only the uncompressed exIF chunk will be
    written and the hex-encoded zTXt chunk containing the raw Exif
    profile won't be written.

2017-01-27  7.0.4-6 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.4-6, GIT revision 19442:4747de9:20170127.

2017-01-27  7.0.4-6 Cristy  <quetzlzacatenango@image...>
  * Uninitialized data in MAT image format (reference
    ImageMagick/ImageMagick#362).
  * Properly auto-fit caption (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30887).
  * Correction to composite Over operator (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31282).
  * Respect gravity option (reference
    https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31284).

2017-01-22  7.0.4-6 Glenn Randers-Pehrson <glennrp@image...>
  * Renamed read_vpag_chunk_callback() function to png_user_chunk_callback()
    in coders/png.c
  * Implemented a private PNG caNv (canvas) chunk for remembering the
    original dimensions and offsets when an image is cropped.  Previously
    we used the oFFs and vpAg chunks for this purpose, but this had potential
    conflicts with other applications that also use the oFFs chunk.
  * coders/png.c: Added support for a proposed new PNG chunk (exIf
    read-write, eXIf read-only) that is currently being discussed on the
    png-mng-misc at lists.sourceforge.net mailing list.

2017-01-22  7.0.4-6 Dirk Lemstra <dirk@lem.....org>
  * Replaced CoderSeekableStreamFlag with CoderDecoderSeekableStreamFlag and
    CoderEncoderSeekableStreamFlag.
@dlemstra
Copy link
Member

Can we close this issue @njdoyle?

@njdoyle njdoyle closed this as completed Mar 13, 2017
clrpackages pushed a commit to clearlinux-pkgs/ImageMagick that referenced this issue Jul 17, 2017
…on 6.9.7

2017-02-04  6.9.7-7 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.7-7, GIT revision 11338:cc980d1:20170204.

2017-01-28  6.9.7-7 Cristy  <quetzlzacatenango@image...>
  * Sanitize comments that include braces for the MIFF image format (reference
    ImageMagick/ImageMagick#368).

2017-01-27  6.9.7-6 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 6.9.7-6, GIT revision 11327:6b2f052:20170127.

2017-01-27  6.9.7-6 Cristy  <quetzlzacatenango@image...>
  * Uninitialized data in MAT image format (reference
    ImageMagick/ImageMagick#362).

2017-01-22  6.9.7-6 Glenn Randers-Pehrson <glennrp@image...>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants