diff -Nru graphicsmagick-1.4+really1.3.37+hg16662/debian/changelog graphicsmagick-1.4+really1.3.37+hg16662/debian/changelog --- graphicsmagick-1.4+really1.3.37+hg16662/debian/changelog 2022-02-11 10:39:16.000000000 -0700 +++ graphicsmagick-1.4+really1.3.37+hg16662/debian/changelog 2022-02-24 18:38:23.000000000 -0700 @@ -1,3 +1,10 @@ +graphicsmagick (1.4+really1.3.37+hg16662-1ubuntu1) jammy; urgency=medium + + * Revert 16603:ba930c1fc380 to address regression in ruby-mini-magick + (LP: #1962210) + + -- Dan Bungert Thu, 24 Feb 2022 18:38:23 -0700 + graphicsmagick (1.4+really1.3.37+hg16662-1) unstable; urgency=medium * Mercurial snapshot, fixing the following security issues: diff -Nru graphicsmagick-1.4+really1.3.37+hg16662/debian/control graphicsmagick-1.4+really1.3.37+hg16662/debian/control --- graphicsmagick-1.4+really1.3.37+hg16662/debian/control 2022-02-11 10:39:16.000000000 -0700 +++ graphicsmagick-1.4+really1.3.37+hg16662/debian/control 2022-02-24 18:38:23.000000000 -0700 @@ -1,7 +1,8 @@ Source: graphicsmagick Section: graphics Priority: optional -Maintainer: Laszlo Boszormenyi (GCS) +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) Build-Depends: debhelper-compat (= 13), pkg-config, libjpeg-dev, liblcms2-dev, libwmf-dev (>= 0.2.8.4), libx11-dev, libsm-dev, libice-dev, libxext-dev, x11proto-core-dev, libxml2-dev, libfreetype6-dev, libbz2-dev, libtiff-dev, diff -Nru graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/revert-jpeg-profiles.patch graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/revert-jpeg-profiles.patch --- graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/revert-jpeg-profiles.patch 1969-12-31 17:00:00.000000000 -0700 +++ graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/revert-jpeg-profiles.patch 2022-02-24 18:38:23.000000000 -0700 @@ -0,0 +1,203 @@ +Description: Revert change 16603:ba930c1fc380 for regression +Author: Dan Bungert +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1962210 +Forwarded: yes - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006374 +Last-Update: 2022-02-24 +--- a/coders/jpeg.c ++++ b/coders/jpeg.c +@@ -172,9 +172,6 @@ + int + max_scan_number; + +- ProfileInfo +- profiles[16]; +- + unsigned char + buffer[65537+200]; + +@@ -207,79 +204,10 @@ + + static MagickClientData *FreeMagickClientData(MagickClientData *client_data) + { +- unsigned int +- i; +- +- /* Free profiles data */ +- for (i=0 ; i < ArraySize(client_data->profiles); i++) +- { +- MagickFreeMemory(client_data->profiles[i].name); +- MagickFreeResourceLimitedMemory(client_data->profiles[i].info); +- } +- + MagickFreeMemory(client_data); + return client_data; + } + +-/* Append named profile to profiles in client data. */ +-static MagickPassFail +-AppendProfile(MagickClientData *client_data, +- const char *name, +- const unsigned char *profile_chunk, +- const size_t chunk_length) +-{ +- unsigned int +- i; +- +- /* +- If entry with matching name is found, then add/append data to +- profile 'info' and update profile length +- */ +- for (i=0 ; i < ArraySize(client_data->profiles); i++) +- { +- ProfileInfo *profile=&client_data->profiles[i]; +- if (!profile->name) +- break; +- if (strcmp(profile->name,name) == 0) +- { +- const size_t new_length = profile->length+chunk_length; +- unsigned char *info = MagickReallocateResourceLimitedMemory(unsigned char *, +- profile->info,new_length); +- if (info != (unsigned char *) NULL) +- { +- profile->info = info; +- (void) memcpy(profile->info+profile->length,profile_chunk,chunk_length); +- profile->length=new_length; +- return MagickPass; +- } +- } +- } +- +- +- /* +- If no matching entry, then find unallocated entry, add data to +- profile 'info' and update profile length +- */ +- for (i=0 ; i < ArraySize(client_data->profiles); i++) +- { +- ProfileInfo *profile=&client_data->profiles[i]; +- if (profile->name) +- continue; +- profile->name=AcquireString(name); +- profile->info=MagickAllocateResourceLimitedMemory(unsigned char*,chunk_length); +- if (!profile->name || !profile->info) +- { +- MagickFreeMemory(profile->name); +- MagickFreeResourceLimitedMemory(profile->info); +- break; +- } +- (void) memcpy(profile->info,profile_chunk,chunk_length); +- profile->length=chunk_length; +- return MagickPass; +- } +- return MagickFail; +-} +- + /* + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % % +@@ -614,6 +542,9 @@ + MagickClientData + *client_data; + ++ Image ++ *image; ++ + size_t + header_length=0, + length; +@@ -666,6 +597,7 @@ + Obtain Image. + */ + client_data=(MagickClientData *) jpeg_info->client_data; ++ image=client_data->image; + + /* + Copy profile from JPEG to allocated memory. +@@ -704,7 +636,7 @@ + /* + Store profile in Image. + */ +- (void) AppendProfile(client_data,profile_name,profile+header_length, ++ (void) AppendImageProfile(image,profile_name,profile+header_length, + length-header_length); + + (void) LogMagickEvent(CoderEvent,GetMagickModule(), +@@ -724,6 +656,9 @@ + MagickClientData + *client_data; + ++ Image ++ *image; ++ + unsigned char + *profile; + +@@ -762,6 +697,7 @@ + (void) GetCharacter(jpeg_info); /* markers */ + length-=14; + client_data=(MagickClientData *) jpeg_info->client_data; ++ image=client_data->image; + + /* + Read color profile. +@@ -780,7 +716,7 @@ + break; + } + if (i == length) +- (void) AppendProfile(client_data,"ICM",profile,length); ++ (void) AppendImageProfile(image,"ICM",profile,length); + + return(True); + } +@@ -889,7 +825,7 @@ + break; + } + if (i == length) +- (void) AppendProfile(client_data,"IPTC",profile,length); ++ (void) AppendImageProfile(image,"IPTC",profile,length); + + return(True); + } +@@ -1250,7 +1186,7 @@ + const char + *value; + +- register unsigned long ++ register long + i; + + struct jpeg_error_mgr +@@ -1842,22 +1778,6 @@ + } + jpeg_destroy_decompress(&jpeg_info); + MagickFreeResourceLimitedMemory(jpeg_pixels); +- +- /* +- Store profiles in image. +- */ +- for (i=0 ; i < ArraySize(client_data->profiles); i++) +- { +- ProfileInfo *profile=&client_data->profiles[i]; +- if (!profile->name) +- continue; +- if (!profile->length) +- continue; +- if (!profile->info) +- continue; +- (void) SetImageProfile(image,profile->name,profile->info,profile->length); +- } +- + client_data=FreeMagickClientData(client_data); + CloseBlob(image); + +--- a/magick/profile.h ++++ b/magick/profile.h +@@ -46,7 +46,7 @@ + extern MagickExport MagickPassFail + AppendImageProfile(Image *image,const char *name, + const unsigned char *profile_chunk, +- const size_t chunk_length) MAGICK_FUNC_DEPRECATED; ++ const size_t chunk_length); + + /* + Generic iterator for traversing profiles. diff -Nru graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/series graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/series --- graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/series 2021-12-13 09:50:54.000000000 -0700 +++ graphicsmagick-1.4+really1.3.37+hg16662/debian/patches/series 2022-02-24 18:38:23.000000000 -0700 @@ -1,2 +1,3 @@ link-demos.diff semaphore_O0_ppc64el.patch +revert-jpeg-profiles.patch