rmagick 6.1.4 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.devcontainer/ImageMagick6/devcontainer.json +1 -1
- data/.devcontainer/devcontainer.json +1 -1
- data/.github/workflows/ci.yml +15 -15
- data/CHANGELOG.md +10 -0
- data/Gemfile +2 -0
- data/Rakefile +8 -0
- data/ext/RMagick/rmimage.cpp +11 -8
- data/ext/RMagick/rminfo.cpp +4 -2
- data/lib/rmagick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: abd4bb9648eeac55cad07daf192bd139e0310912a97c9511c3a598e87843f586
|
|
4
|
+
data.tar.gz: 37d89abbb4e552c8f8c620cee0f52534c6ed340e27497cb63a438145bb9e9e59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c7f59350e7c28248d76bbdc75546c658ad5dece7c0d5e76fa83bd5dfda6506a511ea11e7573938bb045f8468bd6deb16b0a829bb5ad5e1b4aae25a7381cdbf2
|
|
7
|
+
data.tar.gz: 6575a013a6d86aa063b1825dee76d21b6b9e5948e4b680a860f1857f22026d1af8cdd06d54eae38a48e6aa71062b07e558c6df59eb1d470c95c60f5096ee7453
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
timeout-minutes: 20
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
19
|
- name: Set up Ruby 3.3
|
|
20
20
|
uses: ruby/setup-ruby@master
|
|
21
21
|
with:
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
name: RBS
|
|
31
31
|
timeout-minutes: 20
|
|
32
32
|
steps:
|
|
33
|
-
- uses: actions/checkout@
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
34
|
- name: Set up Ruby 3.0
|
|
35
35
|
uses: ruby/setup-ruby@master
|
|
36
36
|
with:
|
|
@@ -55,7 +55,7 @@ jobs:
|
|
|
55
55
|
|
|
56
56
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
57
57
|
steps:
|
|
58
|
-
- uses: actions/checkout@
|
|
58
|
+
- uses: actions/checkout@v6
|
|
59
59
|
- name: Cache ImageMagick built objects
|
|
60
60
|
uses: actions/cache@v4
|
|
61
61
|
with:
|
|
@@ -82,14 +82,14 @@ jobs:
|
|
|
82
82
|
strategy:
|
|
83
83
|
fail-fast: false
|
|
84
84
|
matrix:
|
|
85
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
|
85
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0.0-preview2']
|
|
86
86
|
imagemagick-version:
|
|
87
|
-
- { full: 6.9.13-
|
|
88
|
-
- { full: 7.1.2-
|
|
87
|
+
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
88
|
+
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
89
89
|
|
|
90
90
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
91
91
|
steps:
|
|
92
|
-
- uses: actions/checkout@
|
|
92
|
+
- uses: actions/checkout@v6
|
|
93
93
|
- name: Cache ImageMagick built objects
|
|
94
94
|
uses: actions/cache@v4
|
|
95
95
|
with:
|
|
@@ -116,14 +116,14 @@ jobs:
|
|
|
116
116
|
strategy:
|
|
117
117
|
fail-fast: false
|
|
118
118
|
matrix:
|
|
119
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
|
119
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0.0-preview2']
|
|
120
120
|
imagemagick-version:
|
|
121
|
-
- { full: 6.9.13-
|
|
122
|
-
- { full: 7.1.2-
|
|
121
|
+
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
122
|
+
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
123
123
|
|
|
124
124
|
name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
125
125
|
steps:
|
|
126
|
-
- uses: actions/checkout@
|
|
126
|
+
- uses: actions/checkout@v6
|
|
127
127
|
- name: Cache ImageMagick built objects
|
|
128
128
|
uses: actions/cache@v4
|
|
129
129
|
with:
|
|
@@ -151,14 +151,14 @@ jobs:
|
|
|
151
151
|
matrix:
|
|
152
152
|
ruby-version: ['3.4']
|
|
153
153
|
imagemagick-version:
|
|
154
|
-
- { full: 6.9.13-
|
|
155
|
-
- { full: 7.1.2-
|
|
154
|
+
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
155
|
+
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
156
156
|
os:
|
|
157
157
|
- { target: windows-latest, arch: 'x64' }
|
|
158
158
|
- { target: windows-11-arm, arch: 'arm64' }
|
|
159
159
|
exclude:
|
|
160
160
|
# ImageMagick 6 has not provided ARM binary. Ref. https://legacy.imagemagick.org/archive/binaries/
|
|
161
|
-
- imagemagick-version: { full: 6.9.13-
|
|
161
|
+
- imagemagick-version: { full: 6.9.13-33, major-minor: '6.9' }
|
|
162
162
|
os: { target: windows-11-arm, arch: 'arm64' }
|
|
163
163
|
|
|
164
164
|
env:
|
|
@@ -167,7 +167,7 @@ jobs:
|
|
|
167
167
|
|
|
168
168
|
name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
169
169
|
steps:
|
|
170
|
-
- uses: actions/checkout@
|
|
170
|
+
- uses: actions/checkout@v6
|
|
171
171
|
- name: Setup environment variable
|
|
172
172
|
# https://stackoverflow.com/questions/60169752/how-to-update-the-path-in-a-github-action-workflow-file-for-a-windows-latest-hos
|
|
173
173
|
run: |
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
|
6
|
+
## RMagick 6.1.5
|
|
7
|
+
|
|
8
|
+
Bug Fixes
|
|
9
|
+
|
|
10
|
+
- Fix memory leak in Image#marshal_load (#1721)
|
|
11
|
+
- Fix memory leak in Image::Info#page= (#1720)
|
|
12
|
+
- Fix memory leak in Image::Info#view= with ImageMagick 7 (#1719)
|
|
13
|
+
- Fix memory leak in Image::Info#authenticate= with ImageMagick 7 (#1718)
|
|
14
|
+
- Fix memory leak in Image#marshal_load with invalid data (#1717)
|
|
15
|
+
|
|
6
16
|
## RMagick 6.1.4
|
|
7
17
|
|
|
8
18
|
Improvements
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
|
@@ -185,6 +185,14 @@ Rake::ExtensionTask.new('RMagick2') do |ext|
|
|
|
185
185
|
ext.ext_dir = 'ext/RMagick'
|
|
186
186
|
end
|
|
187
187
|
|
|
188
|
+
if RUBY_PLATFORM.include?('linux')
|
|
189
|
+
require 'ruby_memcheck'
|
|
190
|
+
require 'ruby_memcheck/rspec/rake_task'
|
|
191
|
+
namespace :spec do
|
|
192
|
+
RubyMemcheck::RSpec::RakeTask.new(valgrind: :compile)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
188
196
|
task spec: :compile
|
|
189
197
|
|
|
190
198
|
if ENV['STYLE_CHECKS']
|
data/ext/RMagick/rmimage.cpp
CHANGED
|
@@ -9062,14 +9062,10 @@ Image_marshal_load(VALUE self, VALUE ary)
|
|
|
9062
9062
|
{
|
|
9063
9063
|
VALUE blob, filename;
|
|
9064
9064
|
Info *info;
|
|
9065
|
-
Image *image;
|
|
9065
|
+
Image *image, *new_image;
|
|
9066
9066
|
ExceptionInfo *exception;
|
|
9067
9067
|
|
|
9068
|
-
|
|
9069
|
-
if (!info)
|
|
9070
|
-
{
|
|
9071
|
-
rb_raise(rb_eNoMemError, "not enough memory to initialize Info object");
|
|
9072
|
-
}
|
|
9068
|
+
TypedData_Get_Struct(self, Image, &rm_image_data_type, image);
|
|
9073
9069
|
|
|
9074
9070
|
filename = rb_ary_shift(ary);
|
|
9075
9071
|
blob = rb_ary_shift(ary);
|
|
@@ -9077,20 +9073,27 @@ Image_marshal_load(VALUE self, VALUE ary)
|
|
|
9077
9073
|
filename = StringValue(filename);
|
|
9078
9074
|
blob = StringValue(blob);
|
|
9079
9075
|
|
|
9076
|
+
info = CloneImageInfo(NULL);
|
|
9077
|
+
if (!info)
|
|
9078
|
+
{
|
|
9079
|
+
rb_raise(rb_eNoMemError, "not enough memory to initialize Info object");
|
|
9080
|
+
}
|
|
9081
|
+
|
|
9080
9082
|
exception = AcquireExceptionInfo();
|
|
9081
9083
|
if (filename != Qnil)
|
|
9082
9084
|
{
|
|
9083
9085
|
strlcpy(info->filename, RSTRING_PTR(filename), sizeof(info->filename));
|
|
9084
9086
|
}
|
|
9085
9087
|
GVL_STRUCT_TYPE(BlobToImage) args = { info, RSTRING_PTR(blob), (size_t)RSTRING_LEN(blob), exception };
|
|
9086
|
-
|
|
9088
|
+
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(BlobToImage), &args);
|
|
9087
9089
|
|
|
9088
9090
|
// Destroy info before raising an exception
|
|
9089
9091
|
DestroyImageInfo(info);
|
|
9090
9092
|
CHECK_EXCEPTION();
|
|
9091
9093
|
DestroyExceptionInfo(exception);
|
|
9092
9094
|
|
|
9093
|
-
UPDATE_DATA_PTR(self,
|
|
9095
|
+
UPDATE_DATA_PTR(self, new_image);
|
|
9096
|
+
rm_image_destroy(image);
|
|
9094
9097
|
|
|
9095
9098
|
return self;
|
|
9096
9099
|
}
|
data/ext/RMagick/rminfo.cpp
CHANGED
|
@@ -446,7 +446,7 @@ Info_authenticate_eq(VALUE self, VALUE passwd_arg)
|
|
|
446
446
|
}
|
|
447
447
|
else
|
|
448
448
|
{
|
|
449
|
-
|
|
449
|
+
DeleteImageOption(info, "authenticate");
|
|
450
450
|
}
|
|
451
451
|
#else
|
|
452
452
|
if (info->authenticate)
|
|
@@ -1750,6 +1750,8 @@ Info_page_eq(VALUE self, VALUE page_arg)
|
|
|
1750
1750
|
info->page = NULL;
|
|
1751
1751
|
return page_arg;
|
|
1752
1752
|
}
|
|
1753
|
+
magick_free(info->page);
|
|
1754
|
+
|
|
1753
1755
|
info->page = geometry;
|
|
1754
1756
|
|
|
1755
1757
|
RB_GC_GUARD(geom_str);
|
|
@@ -2292,7 +2294,7 @@ Info_view_eq(VALUE self, VALUE view_arg)
|
|
|
2292
2294
|
}
|
|
2293
2295
|
else
|
|
2294
2296
|
{
|
|
2295
|
-
|
|
2297
|
+
DeleteImageOption(info, "fpx:view");
|
|
2296
2298
|
}
|
|
2297
2299
|
#else
|
|
2298
2300
|
if (info->view)
|
data/lib/rmagick/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rmagick
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.1.
|
|
4
|
+
version: 6.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Hunter
|
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
158
|
version: '0'
|
|
159
159
|
requirements:
|
|
160
160
|
- ImageMagick 6.8.9 or later
|
|
161
|
-
rubygems_version:
|
|
161
|
+
rubygems_version: 4.0.3
|
|
162
162
|
specification_version: 4
|
|
163
163
|
summary: Ruby binding to ImageMagick
|
|
164
164
|
test_files: []
|