From fa248b264e80bf0069bad83d40ca2a30e854d4cde82856678c493d51d7c06266 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Fri, 13 Oct 2023 10:36:06 +0000 Subject: [PATCH] - added patches fix https://github.com/ImageMagick/ImageMagick/commit/3c727503c6ae449160dc92cf6222ebe28ef8fb52 + ImageMagick-correct-time-to-live.patch OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=683 --- ImageMagick-correct-time-to-live.patch | 24 ++++++++++++++++++++++++ ImageMagick.changes | 7 +++++++ ImageMagick.spec | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 ImageMagick-correct-time-to-live.patch diff --git a/ImageMagick-correct-time-to-live.patch b/ImageMagick-correct-time-to-live.patch new file mode 100644 index 0000000..95b6367 --- /dev/null +++ b/ImageMagick-correct-time-to-live.patch @@ -0,0 +1,24 @@ +diff --git a/MagickCore/timer.c b/MagickCore/timer.c +index 5a6576e67a..d33f2d374a 100644 +--- a/MagickCore/timer.c ++++ b/MagickCore/timer.c +@@ -367,7 +367,8 @@ MagickExport time_t GetMagickTime(void) + time_t + epoch; + +- epoch=(time_t) StringToDouble(source_date_epoch,(char **) NULL); ++ epoch=(time_t) CastDoubleToLong(StringToDouble(source_date_epoch, ++ (char **) NULL)); + if ((epoch > 0) && (epoch <= time((time_t *) NULL))) + constant_magick_time=epoch; + } +@@ -409,7 +410,7 @@ MagickPrivate MagickOffsetType GetMagickTTL(void) + magick_epoch=time((time_t *) NULL); + } + return((MagickOffsetType) GetMagickResourceLimit(TimeResource)- +- (GetMagickTime()-magick_epoch)); ++ (time((time_t *) NULL)-magick_epoch)); + } + + /* + diff --git a/ImageMagick.changes b/ImageMagick.changes index 58761fb..db88c6c 100644 --- a/ImageMagick.changes +++ b/ImageMagick.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 13 10:35:49 UTC 2023 - pgajdos@suse.com + +- added patches + fix https://github.com/ImageMagick/ImageMagick/commit/3c727503c6ae449160dc92cf6222ebe28ef8fb52 + + ImageMagick-correct-time-to-live.patch + ------------------------------------------------------------------- Thu Oct 12 10:34:25 UTC 2023 - pgajdos@suse.com diff --git a/ImageMagick.spec b/ImageMagick.spec index 1c6b8f9..c7075e1 100644 --- a/ImageMagick.spec +++ b/ImageMagick.spec @@ -56,6 +56,8 @@ Patch4: ImageMagick-filter.t-disable-Contrast.patch #%%ifarch s390x Patch5: ImageMagick-s390x-disable-tests.patch #%%endif +# https://github.com/ImageMagick/ImageMagick/commit/3c727503c6ae449160dc92cf6222ebe28ef8fb52 +Patch6: ImageMagick-correct-time-to-live.patch BuildRequires: chrpath BuildRequires: dejavu-fonts BuildRequires: fdupes @@ -355,6 +357,7 @@ policy plus disable few other coders for reading and/or writing. %ifarch s390x %patch5 -p1 %endif +%patch6 -p1 %build # bsc#1088463