#876482 imagemagick: Generates wrong image with annotate (missing character,, strange lines)

Package:
imagemagick
Source:
imagemagick
Description:
image manipulation programs -- binaries
Submitter:
Johann Vieselthaler
Date:
2017-09-22 17:15:04 UTC
Severity:
normal
#876482#5
Date:
2017-09-22 17:01:30 UTC
From:
To:
I have a problem generating text with the annotate command since update
from 8:6.7.7.10-5+deb7u4 to 8:6.7.7.10-5+deb7u16.
Version 8:6.7.7.10-5+deb7u4 works correctly, version
8:6.7.7.10-5+deb7u16 does not.

The text in the generated image is wrong. Some lines are missing. One
line is drawn from the end of the text back to the beginning.
You can reproduce it with the following command:
convert -size 320x100 xc:white -font times-bold.ttf -pointsize 72 -fill
white -stroke black -strokewidth 1  -annotate +25+65 'Anthony'
font_stroke_3.jpg
It's important to use the attached font, since with some other fonts the
problem occurs, with others not.

I can give you some additional clue, where to look for the bug:
The difference between version 8:6.7.7.10-5+deb7u4 and version
8:6.7.7.10-5+deb7u16 are approximately 260 patches (located in the
directory debian/patches/ if you have installed the debian sources)
I identified patch
0221-CVE-2017-10928-1-4-Prepare-fix-for-CVE-2017-10928-Ensure-token-does-not-overflow.patch
as the source of the bug.
If you compile the package from debian sources without that patch, the
bug is gone. With that patch included, bug is there.
So for now I use the self compiled library without patch 0221.