zlib 2.1.0 → 2.1.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/ext/zlib/zlib.c +7 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8f0f4c2a4ba8053045fbe977bc5cf5ab6a8d1142d2d6ad7bc80cdbaa8e86da5
4
- data.tar.gz: 67b0d3fb3d2bcd309e6e55298aff6df2a136135a56822b6c057d8236aaa2766c
3
+ metadata.gz: 38b96853c00eb5d1b6b2ad47512fc97d4f4c589e77106dd6cc7f501a3de7ce0c
4
+ data.tar.gz: 8fc6e8d0207cc631d85a2cb248502263faf6b2184fab4de0c762d360c95b482f
5
5
  SHA512:
6
- metadata.gz: 50bf8adea4a39c751f12c6a13c967d3792cf27f5636eb4b1228501a427d9b1b377fd4757c54a4806979631501ee4833dacc9f31a0a41d1aa448138d244911b6d
7
- data.tar.gz: e8e442a205ba16f584a6ac43cf8fa0f5abddfa59e8f6eca007fc5691ec7b82801198461391e3e79866a8d4d38a57f1031ec918a61ccb81aabb94aa35bf544675
6
+ metadata.gz: 3b9a862a80f4b7146e5d918b917990349ed3be78c8636346636f787b6955c764406717330d1206ec8ea9347149ebe544d03e571c8e9754840f1fd6ac38b794df
7
+ data.tar.gz: ca43a10903aa4c981f8de059fd12c695ec4a31b2e8c5ccf34161f828f059660108d7406851c416f90eca9d54f07332cab606c305f566b5b0dac805a94b57e573
data/ext/zlib/zlib.c CHANGED
@@ -25,7 +25,7 @@
25
25
  # define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
26
26
  #endif
27
27
 
28
- #define RUBY_ZLIB_VERSION "2.1.0"
28
+ #define RUBY_ZLIB_VERSION "2.1.1"
29
29
 
30
30
  #ifndef RB_PASS_CALLED_KEYWORDS
31
31
  # define rb_class_new_instance_kw(argc, argv, klass, kw_splat) rb_class_new_instance(argc, argv, klass)
@@ -4199,17 +4199,17 @@ gzreader_charboundary(struct gzfile *gz, long n)
4199
4199
  {
4200
4200
  char *s = RSTRING_PTR(gz->z.buf);
4201
4201
  char *e = s + ZSTREAM_BUF_FILLED(&gz->z);
4202
- char *p = rb_enc_left_char_head(s, s + n, e, gz->enc);
4202
+ char *p = rb_enc_left_char_head(s, s + n - 1, e, gz->enc);
4203
4203
  long l = p - s;
4204
4204
  if (l < n) {
4205
- n = rb_enc_precise_mbclen(p, e, gz->enc);
4206
- if (MBCLEN_NEEDMORE_P(n)) {
4207
- if ((l = gzfile_fill(gz, l + MBCLEN_NEEDMORE_LEN(n))) > 0) {
4205
+ int n_bytes = rb_enc_precise_mbclen(p, e, gz->enc);
4206
+ if (MBCLEN_NEEDMORE_P(n_bytes)) {
4207
+ if ((l = gzfile_fill(gz, n + MBCLEN_NEEDMORE_LEN(n_bytes))) > 0) {
4208
4208
  return l;
4209
4209
  }
4210
4210
  }
4211
- else if (MBCLEN_CHARFOUND_P(n)) {
4212
- return l + MBCLEN_CHARFOUND_LEN(n);
4211
+ else if (MBCLEN_CHARFOUND_P(n_bytes)) {
4212
+ return l + MBCLEN_CHARFOUND_LEN(n_bytes);
4213
4213
  }
4214
4214
  }
4215
4215
  return n;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yukihiro Matsumoto
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-10-14 00:00:00.000000000 Z
12
+ date: 2021-10-19 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Ruby interface for the zlib compression/decompression library
15
15
  email: