-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChangeLog
More file actions
1076 lines (772 loc) · 41.2 KB
/
Copy pathChangeLog
File metadata and controls
1076 lines (772 loc) · 41.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2025-12-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImageFrame): Check for error from
heif_image_handle_get_image_tiling().
2025-12-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImage): Allocate/initialize libheif
decode_options in ReadHEIFImage() and pass as a parameter to
subordinate functions.
2025-12-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/gif.c (ReadGIFImage): Initialize colormap entry which was
added for opacity. Addresses oss-fuzz 465292618
"graphicsmagick:coder_GIF_fuzzer: Use-of-uninitialized-value in
WriteGIFImage".
(ReadGIFImage): Do not use case-insensitive compare when verifying
header magick.
2025-12-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/xpm.c (ParseColor): Avoid a signed-unsigned comparison
warning.
* coders/pict.c (EncodeImage): Use correct formatter for
bytes_per_line.
* doc/options.imdoc: integrated SourceForge "Code Merge Request
#21: Options Documentation: add jxl coder specific options" by
Gabor Bata. Only added two small whitespace fixups and produced
the generated documentation.
2025-11-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/gif.c (ReadGIFImage): Add more GIF header
tracing. Eliminate oss-fuzz 464037554
"graphicsmagick:coder_GIF_fuzzer: Use-of-uninitialized-value in
IsMonochromeImage".
2025-11-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/tiff.c (ReadTIFFImage): Compute possibly reasonable
SingleMemAlloc and MaxCumulatedMemAlloc resource limit values and
pass these TIFFOpenOptions to TIFFClientOpenExt().
2025-11-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImage): Add additional tracing related to
heif_list_compatible_brands().
(apply_security_limits): Trace all heif_security_limits members we
know about, not just one ones we explictly set.
* coders/gif.c (ReadGIFImage): Fix oss-fuzz 463511405
"graphicsmagick:coder_GIF87_fuzzer: Direct-leak in
_MagickReallocateResourceLimitedMemoryLoc". This was a new issue
introduced by recently updated code.
2025-11-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImage): Fix Coverity 500032 "500032 Wrong
sizeof argument".
* coders/gif.c (ReadGIFImage): Store image comment in first image
frame rather than the last frame. Resolves SourceForge issue 761
"Reading multiple GIFs doesn't read the comments correctly.".
Also, change memory allocation to use resource-limited memory
allocators.
(WriteGIFImage): Use resource-limited memory allocators.
* fuzzing/oss-fuzz-build.sh: Restore default liblzma coders. This
will cause some oss-fuzz reports to re-appear.
2025-11-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImageFrame): Report an error if libheif
returns heif_error_Ok but failed to return an image. This should
avoid oss-fuzz 462673424 "graphicsmagick:coder_HEIF_fuzzer:
Null-dereference READ in heif_image_get_decoding_warnings".
* fuzzing/oss-fuzz-build.sh: Also specify list of decoders when
building liblzma.
2025-11-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImage): Fixes for ignore_transformations
in 'ping' mode. Trace decoding warnings. Don't use variable
length arrays for "compatible_brands".
* wand/magick_wand.c (MagickSetBackgroundColor): Add new function
to support setting the default background color. Completes
addressing GraphicsMagick discussion thread at
https://sourceforge.net/p/graphicsmagick/discussion/250738/thread/542a23c291/
"How to load SVG with transparent background in C/Pascal?".
* coders/mvg.c (ReadMVGImage): Initialize image canvas with the
background color (default white), which may be
transparent. Previously, the image was always set to
opaque. Partially addresses GraphicsMagick discussion thread at
https://sourceforge.net/p/graphicsmagick/discussion/250738/thread/542a23c291/
"How to load SVG with transparent background in C/Pascal?".
2025-11-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* fuzzing/oss-fuzz-build.sh: Update the xz configure options.
* coders/heif.c (ReadHEIFImage): Read image frame from heif image
handle using the function ReadHEIFImageFrame().
2025-11-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/render.c (DrawImage): Parse MVG "viewbox". Not used for
anything yet.
* coders/jxl.c (ReadJXLImage): Fix oss-fuzz issue 461122808
"graphicsmagick:coder_TIFF_any_fuzzer: Undefined-shift in
ReadJXLImage".
* magick/memory.c (MagickRealloc): MagickRealloc() now behaves
like standard realloc(). The dubious responsibility to free the
original memory upon allocation failure has now been delegated to
the MagickReallocMemory() macro.
* magick/memory.c (MagickReallocStd): This private function has
been removed.
* magick/memory-private.h: Move declarations of
MagickCloneMemory(), MagickFreeAligned(), MagickMallocAligned(),
MagickMallocCleared(), MagickRealloc(), and MagickReallocStd() to
magick/memory-private.h since they are not intended for general
consumption.
* magick/memory.c, magick/memory-private.h, coders/jp2.c: New
managed-memory functions which have added module, function, and
line parameters are renamed with "Loc" at end of names. Restore
original managed-memory functions, which are a useful replacement
for malloc, realloc, free.
2025-11-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/tiff.c (ReadTIFFImage): Require that libtiff produce a
scanline, strip, or tile, before allocating pixels from pixel
cache.
2025-11-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/jp2.c (alloc_rlm) (free_rlm) (realloc_rlm): Update to
pass file and line information to resource-limited memory calls.
* magick/memory.c (_SetMagickResourceLimitedMemoryLimitP): Add new
private function _SetMagickResourceLimitedMemoryLimitP(), which
allows specifying additional limits for allocation size, number of
re-allocations, and number of re-allocations with a move.
(_MagickAllocateResourceLimitedMemory)
(_MagickFreeResourceLimitedMemory)
(_MagickReallocateResourceLimitedMemory): Added module, function,
and line parameters for the purpose of tracing, and to capture the
source location where the allocation was made.
2025-11-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/render.c (DrawImage): Use resource-limited memory
allocator when allocating graphic contexts.
2025-11-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* VisualMagick/installer/inc/body.isx (VCRedistNeedsInstall): Do
not default to VC_2008. This change will hopefully solve the issue
noted by OELS in the discussion thread
https://sourceforge.net/p/graphicsmagick/discussion/250737/thread/8812618fc6/
in that the installer attempts to execute vcredist_x64.exe.
* magick/render.c (PrimitiveInfoRealloc): Uncomment line
pertaining to "+100 for headroom" which was commented out on
2025-11-09. Fixes oss-fuzz issue 459618468
"graphicsmagick:coder_MVG_fuzzer: ASSERT: i < number_points".
* fuzzing/oss-fuzz-build.sh: Disable JBIG support in libtiff
because it has been fuzz-tested for quite a few years already and
the slow codec leads to false bug reports.
2025-11-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImage): Log more information about the
file.
* magick/magic.c: Add all of the HEIF fourcc identifier values
currently known by libheif.
2025-11-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/pnm.c (PNMInteger): Fix Coverity 493469 "Logically dead
code".
* magick/render.c (PrimitiveInfoRealloc): Use the resource-limited
memory allocator to allocate/reallocate PrimitiveInfo array.
(PrimitiveInfoRealloc): Ensure that PrimitiveInfo text is freed
upon a realloc failure.
2025-11-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/tiff.c (ReadTIFFImage): Don't expect TIFFReadRGBAImage()
to handle more than 4 samples per pixel.
2025-11-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (apply_security_limits): Apply default
max-memory-block-size and max-total-memory limits based on
GraphicsMagick resource limits. These may be overridden
explicitly.
(ReadHEIFImage): Invert the sense of ignore_transformations.
Default 'ignore_transformations' to true since otherwise
'identify' can be very slow due to doing much of the work involved
with reading the file. The user should pass '-define
heif:ignore-transformations=false' if a fully accurate report of
image dimensions (and some other information) is required. This
is to address the concern raised in issue #75 "Optimize HEIC
identify performance by deferring libheif initialization".
2025-11-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/pnm.c (ReadPNMImage): Support reading PBM raw (P1), PGM
raw (P2), and PPM raw (P3) files which lack a newline character at
the end of the last line. This is regardless of the fact that the
specification says "There is a newline character at the end of
each of these lines.", while also saying "Programs that read this
format should be as lenient as possible, accepting anything that
looks remotely like a ...". This change supports the lenient
clause.
2025-11-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
2025-11-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/pict.c: Fix reading/writing PICTs with PixMap
rowBytes=[201..250]. ImageMagick issue 7837 "Converting some
images to PICT results in files that will crash a classic Mac
system" reported by Brian Kendall
(https://github.com/ImageMagick/ImageMagick/issues/7837)
* NEWS.txt: Update the news.
* www/INSTALL-unix.rst (--enable-magick-compat): Add more
warnings/admonitions regarding using --enable-magick-compat.
* magick/enum_strings.c (StringToChannelType): Accept "Alpha" as a
synonym for "Opacity".
(StringToCompositeOperator): Accept "CopyAlpha" as a synonym for
"CopyOpacity".
2025-11-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/command.c: Add comment for LoadAndCacheImageFile().
(ConvertImageCommand): Support -remap, which is equivalent to
-map. This is to improve compatibility with ImageMagick.
(MogrifyImage): Support -remap, which is equivalent to -map. This
is to improve compatibility with ImageMagick.
* magick/module_aliases.h (ModuleAliases): Add a mapping from
magick "MPRI" to module "MPR". This missing mapping caused the
"MPRI" coder to not work for non-module builds. As a result, the
'mogrify' "hald-clut", "map", "mask", and "tile" subcommands were
not working.
2025-10-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImage): Check the
heif_image_handle_get_preferred_decoding_colorspace() return code
for errors. Should fix oss-fuzz 456486373
"graphicsmagick:enhance_fuzzer: Use-of-uninitialized-value in
ReadHEIFImage". Luckily, the impact from this issue seems benign.
2025-10-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
2025-10-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* doc/options.imdoc: Document the HEIF security limits settings,
as much as they already are by the libheif code.
* coders/heif.c (apply_security_limits): Support all of the
heif_security_limits options.
* coders/jpeg.c (WriteJPEGImage): Enforce that JPEG is written as
RGB unless a different colorspace was specified.
* coders/heif.c (apply_security_limits): Support setting some
security limits using 'heif' attributes 'max-number-of-tiles',
'max-bayer-pattern-pixels', 'max-items', 'max-components',
'max-iloc-extents-per-item', 'max-size-entity-group', and
'max-children-per-box'. Patterned after what was already done in
ImageMagick, except using 'heif' rather than 'heic'.
(ReadHEIFImage): Use heif:preserve-colorspace=true or
heif:preserve-colorspace=1 to return the image in the original
colorspace. This allows an image to be returned in the original
YCbCr colorspace rather than RGB.
* magick/utility.c (MagickAtoULLChk): New private function to
decode string to an 'unsigned long long'.
2025-10-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (ReadHEIFImage): Re-write the HEIF reader (AVIF,
HEIC, etc.) to be based on heif_image_get_plane_readonly2().
There is still more to do, such as to provide more user control
over the decoding.
2025-10-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/heif.c (apply_security_limits): Start using the
heif_context_get_security_limits() interface to update
limits. Still limited to a pixels limit for the moment.
* magick/resize.c (ThumbnailImage): Prevent a divide by zero crash
similar to ImageMagick's security advisory GHSA-fh55-q5pj-pxgw
"Divide-by-zero in ThumbnailImage via montage -geometry ":" leads
to crash".
* www/INSTALL-windows.rst: Document use of newer (v0.2.13+) libwmf
version. Jumping forward 24 years!
* VisualMagick/wmf: Support compilation of libwmf v0.2.13+ with
Visual Studio 2022.
* wmf: Import https://github.com/caolanm/libwmf files (v0.2.13+)
up to commit ec63c9b as of 1/14/25
2025-10-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* README.txt, fuzzing/README.txt, www/INSTALL-windows.rst:
Documentation updates.
2025-10-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/command.c (MagickCommand): Avoid a crash if
command_vector is null. Resolves SourceForge issue #758 "gm
benchmark: NULL pointer dereference when "batch" subcommand is
passed".
2025-10-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* Magick++/drawing-primitives.txt: Update some of the drawing
primitives summary.
* magick/render.c (DrawImage): Add support for "decorate none".
2025-10-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/paint.c (ColorFloodfillImage): Address oss-fuzz 450182424
"graphicsmagick:coder_WMF_fuzzer: Timeout in coder_WMF_fuzzer".
The problem is that the floodfill algorithm may not converge if a
clip-mask is present.
(MatteFloodfillImage): Use resource limited memory for segment
stack. Throw an error if a clip-mask is present.
2025-10-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/paint.c (ColorFloodfillImage): Disentangle loops and add
OpenMP to tile fill color or pattern onto floodplane.
* coders/wmf.c (lite_font_map): Fix memory leaks when type.mgk is
not found. Addresses oss-fuzz 450082723
"graphicsmagick:coder_WMF_fuzzer: Direct-leak in AcquireString".
2025-10-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* Magick++/lib/Image.cpp: Translate text with TranslateText()
prior to setting an attribute with SetImageAttribute for the
"comment" and "label" attributes given that SetImageAttribute() no
longer implicitly does that.
* PerlMagick/Magick.xs: Translate text with TranslateText() prior
to setting an attribute with SetImageAttribute for the "comment"
and "label" attributes given that SetImageAttribute() no longer
implicitly does that.
* fuzzing/oss-fuzz-build.sh (enable_libwmf): Enable building
libwmf in the oss-fuzz build.
2025-10-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* fuzzing/oss-fuzz-build.sh: Add build rules for libwmf. Leave
disabled until the oss-fuzz project picks up changes to the
Dockerfile.
* www/INSTALL-windows.rst: Document a new upstream source for
libwmf.
2025-10-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
* www/: Update URLs in documentation to use https where possible,
update to re-directed locations, or remove URLs where no viable
substitute can be found.
2025-09-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/jp2.c (ReadJP2Image): Assume 3 samples per pixel.
* fuzzing/utils.cc (MagickState): Also set the PixelsResource
limit.
* coders/jp2.c (ReadJP2Image): Include width and height resource
limits, as well as image pixel memory requirements when estimating
the Jasper max_samples limit value.
(ReadJP2Image): Use PixelsResource rather than MemoryResource when
estimating the Jasper max_samples limit value.
2025-09-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
* www/benchmarks.rst: Provide an example of how to use Hyperfine
to benchmark two commands under Linux.
* www/index.rst: Add/update Coverity and Clang 15 scan-build
metrics.
* coders/braille.c (WriteBRAILLEImage): Eliminate a Clang
scan-build gripe regarding access off the end of an array. In
practice, this would never happen given that the inputs are
already sanitized.
* coders/xpm.c (ParseColor): Eliminate a Clang scan-build gripe
about use of a "garbage value". It is not clear to me that the
implementation could actually provoke this issue given the huge
amount of successful fuzzer tests.
2025-09-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/attribute.c (GenerateEXIFAttribute): Provide a way to
accept somewhat incorrect field tags. For the moment, accept
incorrect field tags, but provide a way to trace the "fishy" field
tags.
* fuzzing/oss-fuzz-build.sh (enable_de265): Remove libde265 from
the oss-fuzz build given that it obviously has never been fuzz
tested, does not appear to be maintained, and it is producing the
majority of the reports.
2025-09-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* www/INSTALL-windows.rst: Provide a summary description of the
3rd party libraries included in the VisualMagick source tree.
Include when the source code was last updated by the original
authors, or last updated in the Mercurial repository if the code
is still being developed.
2025-09-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* VisualMagick/installer/inc/files-dlls.isx: For modern Visual
Studio 2019 and later (which is all we support now), default to
not bundling any run-time at all. Just assume that the computer
already has it! Visual Studio 2015, 2017, 2019, and 2022 all use
the same runtime package, and it is a system component.
* VisualMagick/CMakeLists.txt: Increase WINVER to 0x501 so that
configure may be compiled using Visual Studio 2022.
* VisualMagick/configure/welcome_page.cpp: Update welcome page
text so that it fits the screen, and it says that Visual Studio
2019 (or later) is required.
* VisualMagick/configure/configure.exe: Update pre-compiled
configure binary, which is compiled using Visual Studio 2022.
2025-09-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/attribute.c (ValidateIfdTagFmt): Extract tag validation
code into a reusable function. Improve tracing.
* coders/tiff.c (AddIFDExifFields): Trace the field type name.
2025-09-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
2025-09-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* www/authors.rst: Moved Jaroslav Fojtik and Tobias Mark to former
contributor status. Added missing contributions by Jaroslav
Fojtik.
* coders/topol.c (CheckFName): Mask a needless type conversion
warning. Whitespace-cleanup and indent according to project
conventions.
* magick/blob.c (BlobToFile): Mask a needless type conversion warning.
* magick/magic.c (ListMagicInfo): Avoid needless type conversion warnings.
2025-09-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/attribute.c (tag_table): Use bit-fields and OR logic to
handle the case where mutiple TIFF tag types are accepted.
(GenerateEXIFAttribute): Improve correctness of EXIF tables based
on specifications and testing with real-world files. Filter out
GPS and EXIF tags which fail tests. Enable use of bsearch().
2025-09-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* fuzzing/oss-fuzz-build.sh: Pass -fno-sanitize=undefined when
building Jasper and libde265 because they are not prepared to pass
such testing.
2025-08-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* configure.ac: Capture per-library dependency information from
pkg-config data and provide a per-library library dependency list
in the final configuration summary. If pkg-config is executed
with the --static option, then much more information is revealed
by the configuration summary.
2025-08-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* configure.ac: Remove quoting of PNG_LIBS which prevented
white-space splitting it into arguments.
2025-08-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* configure.ac: Require Autoconf 2.71 (or later) since this
version is well supported by modern OS build environments.
Extract the library name (e.g. -lpng16) from PNG_LIBS.
2025-08-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* configure.ac: When libpng information is provided by pkgconf
(pkg-config), use only the library name that pkgconf
provides. Addresses SourceForge Patch #85 "Fix detection of png
debug".
2025-08-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/utility.c (MagickCreateDirectoryPath): Microsoft Windows
mkdir() does not accept a directory mode argument. Fix unused
variable warning related to that.
2025-08-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/bmp.c, coders/dib.c, magick/draw.c, wand/drawing_wand.c:
Quiet warnings noticed under Microsoft Windows with GCC 15.
2025-08-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/png.c (WriteOnePNGImage): Fix sign-compare warnings.
* coders/svg.c (ReadSVGImage): Defend against what appears to be a
failure of xmlStopParser() to cause a stop in development libxml2.
Should address oss-fuzz 436118547
"graphicsmagick:coder_SVGZ_fuzzer: Timeout in coder_SVGZ_fuzzer".
* magick/render.c (DrawImage): Do not dereference null memory
memory allocation for 'token' fails. Do not ignore
DrawPatternPath() failure. Addresses oss-fuzz 436131990
"graphicsmagick:coder_MVG_fuzzer: Null-dereference WRITE in
DrawImage".
2025-08-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/png.c (WriteOnePNGImage): Pass colormap index for Palette
image when writing bKGD chunk.
(WriteOnePNGImage): For Palette image, need to use colormap index
rather than a computed grayscale value. This addresses oss-fuzz
435651831 "graphicsmagick:coder_PNG8_fuzzer: Heap-buffer-overflow
in WriteOnePNGImage", which became evident after the recent PNG8
work.
(WriteOnePNGImage): Replace semi-transparent colors which are very
close to the transparent background color, with the transparent
background color.
2025-07-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* tests/rwfile.tap: Add tests for PNG24, PNG32, PNG48, and PNG8
PNG subformats.
* coders/png.c (WriteOnePNGImage): More work on writing PNG8
format. It is decided that PNG8 does indeed mean "Indexed-color
with 8-bit sample depth. Binary transparency is supported, but not
full-alpha tRNS-type.". As a value add for the user, if the image
background color is fully transparent, then its color index is
selected to be the transparent color, and transparency is removed
from any other non-opaque colors. If no effective means is found
to reduce to just one transparent color, opacity is stripped from
the output.
2025-07-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
2025-07-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/render.c (DrawImage): Primitive and token buffers are
based on resource-managed memory.
* coders/tiff.c (AddIFDExifFields): TIFFTAG_COLORMAP depends on
image specific tags, so do not transfer as an EXIF tag. Addresses
oss-fuzz 433440617 "graphicsmagick:coder_TIFF_any_fuzzer:
Null-dereference READ in _TIFFmemcpy".
2025-07-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/command.c (MogrifyImage): Apply text translations for
-comment and -label before calling SetImageAttribute().
* magick/attribute.c (SetImageAttribute): No longer translate
format requests for special format characters (e.g. "%m:%f %wx%h")
in attribute text. These translations were applied for the keys
"comment" and "label". This is a change to existing API behavior
so code depending on this should use TranslateText() to perform
the translations prior to calling SetImageAttribute(). It is not
entirely known what impact this may have, but including this
functionality in SetImageAttribute() was evil given that it is
also used for text attributes read from file metadata.
* magick/analyze.c (GetImageBoundingBox): If image rows or columns
is zero, then return default bounds. Addresses oss-fuzz 431500052
"graphicsmagick:coder_SVG_fuzzer: Integer-overflow in
GetImageBoundingBox".
2025-07-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
* coders/tiff.c (AddIFDExifFields): TIFFTAG_TRANSFERFUNCTION
depends on image specific tags TIFFTAG_BITSPERSAMPLE and
TIFFTAG_SAMPLESPERPIXEL, which are already banned. So also ban
TIFFTAG_TRANSFERFUNCTION. Addresses oss-fuzz 402570327
"graphicsmagick:coder_TIFF_any_fuzzer: Null-dereference READ in
_TIFFmemcpy".
(EXPERIMENTAL_EXIF_TAGS): Enable transfer of EXIF tags by default
again.
2025-06-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* fuzzing/README.txt: Document how to build de265 using cmake.
* fuzzing/oss-fuzz-build.sh: Use cmake to build libde265.
2025-06-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/tiff.c (AddExifFields): Only handle EXIF and GPS IFDs
once. Avoid infinite recursion. Addresses oss-fuzz 405456339
"graphicsmagick:coder_TIFF_any_fuzzer: Stack-overflow in
AddIFDExifFields".
2025-06-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/png.c (ReadMNGImage): Validate that MNG width or height
is non-zero. Addresses oss-fuzz 426843901
"graphicsmagick:coder_MNG_fuzzer: Use-of-uninitialized-value in
SetImageEx".
2025-06-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* fuzzing/oss-fuzz-build.sh (enable_de265): Re-enable compilation
of libde265 since I am informed that the build issue is fixed now.
* magick/attribute.c: Update EXIF tag definitions for Exif Version
3.0. Add more information about the tags. Explore use of bsearch()
for tag look-up.
2025-06-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/attribute.c (tag_table): Capture more EXIF tags, and try
to add tag type information for each tag.
* coders/png.c (WriteOnePNGImage): Cache the output filename
before invoking setjmp() and use it when setjmp() returns
failure. Hopefully will eliminate oss-fuzz 423668251
"graphicsmagick:coder_PNG24_fuzzer: Null-dereference in
WriteOnePNGImage", which I have been unable to reproduce, and for
which the stack trace does not resemble recent code.
2025-06-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* m4/acx_pthread.m4: Update to modern syntax.
* configure.ac: Check and report the ANSI C compiler language
standard version and add specific checks for inttypes.h and
stdint.h.
* www/INSTALL-unix.rst: Add notes about a C'99 compiler now being
required.
* www/INSTALL-windows.rst: Add a note that a Microsoft Visual C++
Redistributable package is required.
2025-06-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
* magick/magick_types.h.in, VisualMagick/magick/magick_types.h.in:
Reduce to pure C'99 definitions from standard header files. Note
that for Visual Studio, Visual Studio 2015 or later is needed in
order to support C'99.
* magick/common.h: Use function attribute __gnu_printf__ rather
than __printf__ in function attribute declarations in order to
allow C'99 formatters with MINGW64 GCC. New macro
MAGICK_FUNC_PRINTF_FORMAT is used for all printf format
declarations.
* configure.ac, magick/magick_types.h.in, etc.: First pass at
depending on a C'99 compliant build environment. Not yet tested
for Microsoft Windows builds.
2025-06-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/colorspace.c (TransformRGBImage): Validate that CineonLog
parameters are in legal ranges. Addresses Coverity 470177
"Division or modulo by float zero".
* coders/logo.c (EmbeddedImageList): Provide space for
"VERTICALRIGHTSHINGLE" string termination.
2025-06-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/utility.c (GetMagickGeometry): Skip resize computions
given an area ('@') value of zero. Coverity 470174 "Division or
modulo by float zero ".
* magick/colorspace.c (RGBTransformImage): Validate that CineonLog
parameters are in legal ranges. Addresses Coverity 470177,
470183, and 470184 "Division or modulo by float zero".
* magick/describe.c (DescribeImage): Fix Coverity 470181 "Division
or modulo by float zero". This is not likely to happen, but
Coverity has no way to know that.
* magick/render.c (DrawPolygonPrimitive): Coverity 470185
"Logically dead code". There is no actual issue of any
consequence.
* magick/pixel_cache.c (CheckImagePixelLimits): Change limit range
check to avoid useless warning about "dead code". Coverity issue
470175 "Logically dead code" and 376900 "Operands don't affect
result".
* coders/rle.c (ReadRLEImage): Verify that integer returned by
ReadBlobByte() is not EOF, and is in range of unsigned char before
assigning value. Coverity issue 10235 "Negative loop bound".
* coders/ps3.c (ZLIBEncode2Image): Assure that z_stream is ended in
error case. Coverity issue 470178 "Resource leak".
* coders/pdf.c (ZLIBEncodeImage): Assure that z_stream is ended in
error case. Coverity issue 470180 "Resource leak".
* coders/caption.c (ReadCAPTIONImage): NULL pointers which are no
longer needed. Coverity issue 470182 about a memory leak via 'q'
appears to be bogus.
* magick/montage.c (CloneMontageInfo): Assure that memory
allocated by GetMontageInfo() is freed, before overwriting the
pointer to it with a new allocation. Coverity issues 470173,
470176, and 40179.
* Makefile.am (coverity-build): Add a 'coverity-build' target,
which only does the Coverity build, without submitting it for
Coverity analysis.
* coders/meta.c (ReadMETAImage): WriteBlob() does not perform
partial writes so remove that apparent assumption.
2025-06-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/meta.c (formatIPTC): Return immediately upon blob I/O
error.
(parse8BIM): Return immediately upon blob I/O error.
(parse8BIMW): Return immediately upon blob I/O error.
2025-06-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* doc/options.imdoc (characters): Document that adding '!' to the
geometry specification does change the image aspect ratio if
necessary. Addresses GraphicsMagick feature request #48
"-geometry !".
2025-06-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/png.c (WriteOnePNGImage): In error handler, check if
image is null prior to attempting to dereference it. This issue
is recently introduced. Should resolve oss-fuzz 423668251
"graphicsmagick:coder_PNG24_fuzzer: Null-dereference in
WriteOnePNGImage".
(WriteOnePNGImage): Fix recently-introduced typo which causes heap
buffer overflow. Should resolve oss-fuzz 423417425
"graphicsmagick:coder_PNG8_fuzzer: Heap-buffer-overflow in
WriteOnePNGImage".
* NEWS.txt: Update the news.
* magick/transform.c (TransformImage): If crop_geometry contains
'%', that should not block a full list of image tiles from being
generated. Resolves SourceForge issue #717 "-crop does not
generate tiles when used with a percentage".
2025-06-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
* coders/png.c (WriteOnePNGImage): Fix broken tRNS table when
writing via "PNG8". Warn if pixel transparencies are independent
of color palette, since this results in a loss of image
quality. Remove output file if an error occurs. Addresses
SourceForge issue #755 "Converting to indexed PNG produces invalid
file".
2025-06-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/wpg.c (ReadWPGImage): Fix improper usage of
MagickReallocateResourceLimitedMemory(). Addresses oss-fuzz
422512441 "graphicsmagick:coder_WPG_fuzzer: Direct-leak in
_MagickReallocateResourceLimitedMemory ()".
* magick/resource.c (DestroyMagickResources): If
DEBUG_MAGICK_RESOURCES is enabled, do not assert unless
DEBUG_MAGICK_RESOURCES_ASSERT is also enabled. An assertion
prevents valgrind from showing us where the leaks are.
* magick/memory.c: Document that
_MagickReallocateResourceLimitedMemory() returns a discrete
pointer, similar to realloc(). This means it does not work the
same as MagickReallocateMemory().
* magick/tsd.c (MagickTsdKeyCreate2): Fix GCC
-Wcalloc-transposed-args related warning.
2025-06-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/svg.c: GetStyleTokens, GetTransformTokens, and
SVGProcessTransformString should have a 'const SVGInfo *svg_info'
argument rather than a wrong and misleading 'void *context'
argument. Fixes a crash which was recently introduced.
(ReadSVGImage): Fix some leaked memory resources, which were not
leaked while using SVGEndDocument().
* coders/msl.c (ReadMSLImage): Use libxml2's SAX handlers for the
MVG XML-based scripting implementation. These changes are
informed by Nick Wellnhofer's changes to ImageMagick's SVG
renderer as provided in ImageMagick pull request 7784 at
"https://github.com/ImageMagick/ImageMagick/pull/7784/commits/c0405a520b6e0e445dd8f70c1883125d2015c298".
This should resolve the MVG portion of SourceForge issue #749 "Use
libxml2's SAX handlers".
(MSLInfo): Add signature to MSLInfo.
* coders/svg.c (SVGInfo): Add signature to SVGInfo.
2025-05-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/svg.c (ReadSVGImage): Use libxml2's SAX handlers for the
SVG renderer. These changes are informed by Nick Wellnhofer's
changes to ImageMagick's SVG renderer as provided in ImageMagick
pull request 7784 at
"https://github.com/ImageMagick/ImageMagick/pull/7784/commits/c0405a520b6e0e445dd8f70c1883125d2015c298".
This should resolve the SVG portion of SourceForge issue #749 "Use
libxml2's SAX handlers".
2025-05-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* fuzzing/oss-fuzz-build.sh: Now that libpng configure.ac has been
fixed upstream, restore 'autoreconf -fiv' step when building
libpng.
2025-05-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/tiff.c: Add support for libtiff 4.5 TIFFWarningExtR() and
TIFFErrorExtR() in order to provide an error handling context per
TIFF handle. This improves concurrency and thread safety when
multiple libraries are using libtiff within the same process.
Resolves SourceForge issue #753 "Support TIFFErrorExtR() in TIFF
coder".
2025-05-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* scripts/format_c_api_doc.py (proto_pretty): Fix regular
expression encoding.
2025-05-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/xpm.c (ParseColor): Avoid truncation of nul character
from "g4 ".
* coders/logo.c (EmbeddedImageList): Avoid truncation of nul
character from "VERTICALRIGHTSHINGLE".
* magick/utility.c (GetPageGeometry): Avoid truncation of nul
character from "LETTERSMALL".
* magick/attribute.c: Avoid truncation of nul character from
"ThumbnailPrimaryChromaticities".
* fuzzing/README.txt: Add notes regarding how to build libjxl for
testing.
2025-05-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/jxl.c (ReadJXLImage): More effort to free profile memory
if JxlDecoderSetBoxBuffer() fails. Addresses oss-fuzz issue
"graphicsmagick:coder_TIFF_any_fuzzer: Direct-leak in
_MagickReallocateResourceLimitedMemory". Maybe this will fix it.
2025-05-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/magick_types.h.in: Retreat from use of C'99 printf
macros. The approach used was not working out, and especially
under Microsoft Windows. This means that most changes made
yesterday are reverted.
2025-05-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* www/INSTALL-windows.rst: Suggest that GraphicsMagick now
requires (or will soon require) at least a working C'99 compiler
and headers in order to compile under Microsoft Visual
Studio. Visual Studio support will re-start from Visual Studio
2019 rather than the 2008 edition.
* magick/magick_types.h.in: Use types and declarations from
inttypes.h and stddef.h rather than values from the configure
script. It seems long enough since 1999 that we can rely on these
headers now. ;-)
* configure.ac: Remove code to compute sized types for current CPU
and compiler options.
2025-05-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/jxl.c (ReadJXLImage): Free profile memory if
JxlDecoderSetBoxBuffer() fails. Addresses oss-fuzz issue
"graphicsmagick:coder_TIFF_any_fuzzer: Direct-leak in
_MagickReallocateResourceLimitedMemory".
* fuzzing/oss-fuzz-build.sh: Disable 'harfbuzz' in freetype build
in order to avoid compilation error due to use of RTLD_DEFAULT.
2025-03-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Update the news.
2025-03-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/jxl.c (ReadJXLImage): pixel_format.num_channels needs to
be 2 for grayscale matte. Addresses oss-fuzz 406320404
"graphicsmagick:coder_JXL_fuzzer: Heap-buffer-overflow in
ImportViewPixelArea".
2025-03-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/tiff.c (AddIFDExifFields): Check for overflow of computed
unsigned value. Code is only active if EXPERIMENTAL_EXIF_TAGS is
true. Addresses oss-fuzz 403696329
"graphicsmagick:coder_TIFF_any_fuzzer: Crash in LD_UINT16_HI".
Reflow code to match the conventions used by the rest of the
project.
2025-03-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* NEWS.txt: Updated the news.
* fuzzing/oss-fuzz-build.sh (CPPFLAGS): Continue to enable
EXPERIMENTAL_EXIF_TAGS in oss-fuzz build in order to continue
testing writing EXIF in TIFF format.
* coders/tiff.c (EXPERIMENTAL_EXIF_TAGS): Disable
EXPERIMENTAL_EXIF_TAGS by default until libtiff API weaknesses are
resolved.
2025-03-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* coders/jp2.c (ReadJP2Image): Add casts in order to avoid
compilation warnings with old Jasper.
2025-03-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* README.txt: Refresh README text.
2025-02-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* wand/magick_wand.c: Fix comment indentation issue which was
causing some functions to not appear in the formatted
documentation. Thanks to Robert C. <robgcs@users.sourceforge.net>
for reporting that documentation for some functions were missing.
2025-02-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/nt_base.h: Update notes regarding `_MSC_VER` values and
Visual C++ versions.
* www/index.rst: Promote the Mercurial repository at
https://foss.heptapod.net/graphicsmagick/graphicsmagick since it
seems to work better.
2025-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* magick/magic.c: Make the magic-based format descriptions more
detailed and helpful.
2025-02-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>