ox 2.13.3 → 2.13.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4121ea0bb75760d8b57c9904bf884c44455e1d2613b3826b3765004b006c65a0
4
- data.tar.gz: cb5fbf251430612e4c46feca429a0b8d0e60fee8191a250ec540d709966ca20d
3
+ metadata.gz: 455a3e6630c8cf482656e024c14c609cfcc5441d201dd6b6f7649a283309bf87
4
+ data.tar.gz: e6240807c3f21f2915d044b56bc05433730a39315b10a50c3698adcc5640cf1d
5
5
  SHA512:
6
- metadata.gz: 66995249fcc36e945629c09fe93bac6702b03e644d8fe310068f74f5dd1db47e65f98a86a7390f4cdefe865aa1976239caf283b393d725b1f6aae0cdc6a4d71c
7
- data.tar.gz: 447fa33cc0ac30e78e56823f83b1be8d09dedc7763cb0fb820366c20cfe86ce9aafd6649fd3d0bcc8f90885f60325dae756ec32b44786cd482f9f0f7fb98a7ca
6
+ metadata.gz: 3ddfd3e2a3e80338a1f5d4cf36b9b0ea28b721f24d7d6bc8c3b1a27c2c026484596274b105b4da602e4070627411297295807eebbf83cc923863d4494e0c0c32
7
+ data.tar.gz: af3b468beb6e48aa6046b3829ee186433be56d308dd3bb06b19068eefd4a315c004353aaa245a95fdc42d315e817d7cca4f3d309b745fb782c5e77bbd463e427
@@ -4,6 +4,12 @@ All changes to the Ox gem are documented here. Releases follow semantic versioni
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [2.13.4] - 2020-09-11
8
+
9
+ ### Fixed
10
+
11
+ - Fixed one crash that occurred when a corrupted object encoded string was provided.
12
+
7
13
  ## [2.13.3] - 2020-09-03
8
14
 
9
15
  ### Changed
@@ -237,6 +237,7 @@ static ID
237
237
  get_var_sym_from_attrs(Attr a, void *encoding) {
238
238
  for (; 0 != a->name; a++) {
239
239
  if ('a' == *a->name && '\0' == *(a->name + 1)) {
240
+ name2var(a->value, encoding);
240
241
  return name2var(a->value, encoding);
241
242
  }
242
243
  }
@@ -715,10 +716,14 @@ end_element(PInfo pi, const char *ename) {
715
716
  case ExceptionCode:
716
717
  case ObjectCode:
717
718
  if (Qnil != ph->obj) {
718
- if (0 == h->var) {
719
+ if (0 == h->var || NULL == rb_id2name(h->var )) {
719
720
  set_error(&pi->err, "Invalid element for object mode", pi->str, pi->s);
720
721
  return;
721
722
  }
723
+ if (RUBY_T_OBJECT != rb_type(ph->obj)) {
724
+ set_error(&pi->err, "Corrupt object encoding", pi->str, pi->s);
725
+ return;
726
+ }
722
727
  rb_ivar_set(ph->obj, h->var, h->obj);
723
728
  }
724
729
  break;
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Ox
3
3
  # Current version of the module.
4
- VERSION = '2.13.3'
4
+ VERSION = '2.13.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ox
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.3
4
+ version: 2.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-03 00:00:00.000000000 Z
11
+ date: 2020-09-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: "A fast XML parser and object serializer that uses only standard C lib.\n\nOptimized
14
14
  XML (Ox), as the name implies was written to provide speed optimized\nXML handling.