ImageMagick-7.0.8-29差分
ImageMagick-7.0.8-29差分
http://www.imagemagick.org/script/download.php
The latest release of ImageMagick is version 7.0.8-29
6 系同時リリースは ImageMagick-6.9.10-29
まとめ
- OSS Fuzz の指摘対応とその他。
気になる事
- -trim に -define trim:blend=(0〜100) を追加。 GetImageBoundingBox がだいぶ改造されてる。
- -draw で dash(点線) の間隔に比べて描画線が短い時の処理が変更されてる。
- cms の ContextID の使い方が怪しい。。
- length を extent に変えてるけど、これ後悔しないかな。。 extent は意味がぶれるので。
差分
ChangeLog にない差分
- MagickCore/attribute.c
91a92 > #include "MagickCore/string-private.h" 125,126c126,138 < MagickExport RectangleInfo GetImageBoundingBox(const Image *image, < ExceptionInfo *exception) --- > > typedef struct _EdgeInfo > { > double > left, > right, > top, > bottom; > } EdgeInfo; > > static double GetEdgeBlendFactor(const Image *image,const CacheView *image_view, > const GravityType gravity,const size_t width,const size_t height, > const ssize_t x_offset,const ssize_t y_offset,ExceptionInfo *exception) 129c141 (大量の差分)
- MagickCore/draw.c
- 点線のひとつひとつの長さに満たない線を処理する時の変更。
1810 if (fabs(length) < MagickEpsilon) { > if (fabs(draw_info->dash_pattern[n]) >= MagickEpsilon) > n++; if (fabs(draw_info->dash_pattern[n]) < MagickEpsilon) n=0; length=scale*draw_info->dash_pattern[n]; } 1842a1845 if (fabs(draw_info->dash_pattern[n]) >= MagickEpsilon) n++;
- MagickCore/magick-baseconfig.h
- MAGICKCORE_FONTCONFIG_DELEGATE が undefined の時の対処。デフォルト 1 扱い。
84,86c84 < #ifndef MAGICKCORE_FONTCONFIG_DELEGATE < #define MAGICKCORE_FONTCONFIG_DELEGATE 1 < #endif
- MagickCore/profile.c
- Context ID にスタック変数のポインタ渡してるように見えるけど、大丈夫だっけ。。?
433c433,434 < const int intent,const cmsUInt32Number flags) --- > const int intent,const cmsUInt32Number flags, > CMSExceptionInfo *cms_exception) 452,453c453,454 < transform[i]=cmsCreateTransformTHR((cmsContext) image,source_profile, < source_type,target_profile,target_type,intent,flags); --- > transform[i]=cmsCreateTransformTHR((cmsContext) cms_exception, > source_profile,source_type,target_profile,target_type,intent,flags); 1136c1137,1138 < source_type,target_profile,target_type,intent,flags); --- > source_type,target_profile,target_type,intent,flags, > &cms_exception);
- coders/jp2.c
- デコードエリアの指定。変数名 length => extent 変更。
380a381,383 > jp2_status=opj_set_decode_area(jp2_codec,jp2_image,0,0, > jp2_image->comps[0].w-1,jp2_image->comps[0].h-1); > if (jp2_status != 0) diff -rwB ImageMagick-7.0.8-28/coders/miff.c ImageMagick-7.0.8-29/coders/miff.c 1143c1143 < length=MagickPathExtent; --- > extent=MagickPathExtent; 1145a1146 > length=0; 1149c1150 < if ((strlen(image->directory)+MagickPathExtent) >= length) --- > if ((length+MagickPathExtent) >= extent) 1154c1155 < length<<=1; --- > extent<<=1; 1156c1157 < length+MagickPathExtent,sizeof(*image->directory)); --- > extent+MagickPathExtent,sizeof(*image->directory)); 1159c1160 < p=image->directory+strlen(image->directory); --- > p=image->directory+length; 1164a1166 > length++;
- coders/mpc.c
- 変数名変更 length=>extent
181a182 > extent, 812c813 < length=MagickPathExtent; --- > extent=MagickPathExtent; 814a816 > length=0; 818c820 < if ((strlen(image->directory)+MagickPathExtent) >= length) --- > if ((length+MagickPathExtent) >= extent) 823c825 < length<<=1; --- > extent<<=1; 825c827 < length+MagickPathExtent,sizeof(*image->directory)); --- > extent+MagickPathExtent,sizeof(*image->directory)); 833c835 < p=image->directory+strlen(image->directory); --- > p=image->directory+length; 838a841 > length++;
- coders/pango.c
- pango:align の実装
330a331,340 > option=GetImageOption(image_info,"pango:align"); > if (option != (const char *) NULL) > { > if (LocaleCompare(option,"center") == 0) > align=PANGO_ALIGN_CENTER; > if (LocaleCompare(option,"left") == 0) > align=PANGO_ALIGN_LEFT; > if (LocaleCompare(option,"right") == 0) > align=PANGO_ALIGN_RIGHT; > }
- coders/pdf.c
- CoderDecoderSeekableStreamFlag のフラグセット
921a922 > entry->flags|=CoderDecoderSeekableStreamFlag; 929a931 > entry->flags|=CoderDecoderSeekableStreamFlag; 937a940 > entry->flags|=CoderDecoderSeekableStreamFlag;
718,720d717 < unsigned long < *tietz; < 795,800d791 < if ((TIFFGetField(tiff,37706,&length,&tietz) == 1) && < (tietz != (unsigned long *) NULL)) < { < (void) FormatLocaleString(message,MagickPathExtent,"%lu",tietz[0]); < (void) SetImageProperty(image,"tiff:tietz_offset",message,exception); < }
- coders/wpg.c
- image->colors が小さい場合はカラーマップのコピーのサイズをそっちに合わせる
1265,1266c1265,1266 < (void) memcpy(image->colormap,colormap,colors* < sizeof(*image->colormap)); --- > (void) memcpy(image->colormap,colormap,MagickMin( > image->colors,colors)*sizeof(*image->colormap));
ChangeLog
2019-02-28 7.0.8-29 Cristy <quetzlzacatenango@image...> * Release ImageMagick version 7.0.8-29, GIT revision 15368:5d8ed9f56:20190228 2019-02-28 7.0.8-29 Cristy <quetzlzacatenango@image...> * Fixed a number of issues (reference https://github.com/ImageMagick/ImageMagick/issues). * Fixed numerous use of uninitialized values, integer overflow, memory exceeded, and timeouts (credit to OSS Fuzz).
(ImageMagick-7.0.8-30 の ChangeLog で追記)