Bug 22654

Summary: Imagemagick generate invalid JSON output under certain conditions
Product: Mageia Reporter: Renaud Michel <r.h.michel+mageia>
Component: RPM PackagesAssignee: Stig-Ørjan Smelror <smelror>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: marja11, smelror
Version: 6   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: imagemagick CVE:
Status comment:
Bug Depends on: 19078    
Bug Blocks:    

Description Renaud Michel 2018-02-25 16:10:29 CET
This is with imagemagick-6.9.8.7-1.mga6

When using the JSON output of imagemagick, if the source has a non-default geometry (for example with a convert -crop), the JSON document will contain a originGeometry information which is not properly formatted.

For example, when running

convert -crop 500x100+0+100 myimage.jpg JSON:-

the generated JSON output will contain the following line:

    "originGeometry": +0+100

which is missing a final coma (as it is not at the end of the document) and should be quoted (because it is not a valid number).

This problem has already been fixed upstream:
https://github.com/ImageMagick/ImageMagick/pull/836
https://github.com/ImageMagick/ImageMagick/issues/979
The first is already part of the latest release of branch v6 (6.9.9-31), the second is more recent and was only been backported to v6 two weeks ago
https://github.com/ImageMagick/ImageMagick/pull/981
Comment 1 Marja Van Waes 2018-02-26 08:48:56 CET
Assigning to the registered maintainer.

Assignee: bugsquad => shlomif
CC: (none) => marja11

Comment 2 Stig-Ørjan Smelror 2018-02-28 21:59:12 CET
Hi.

An update to version 6.9.9-36 has been pushed to Mageia 6 updates_testing awaiting validation from the QA team.

If you want to test this yourself, you can enable Updates Testing and install only ImageMagick.

Cheers,
Stig

CC: (none) => smelror

Stig-Ørjan Smelror 2018-02-28 22:00:00 CET

Assignee: shlomif => smelror
Depends on: (none) => 19078

Comment 3 Renaud Michel 2018-02-28 23:09:19 CET
Thank you

I tested it on x86_64, and can confirm that the JSON output (in my use case) is now valid.
Comment 4 David Walser 2018-06-08 20:34:00 CEST
This update has been pushed.

Status: NEW => RESOLVED
Resolution: (none) => FIXED