ox 2.8.0 → 2.8.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ox might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af2271c3c5cd6947ce101436041312351fd0d4f5
4
- data.tar.gz: c1589595a362f3fe1111fc633c33626e529c6792
3
+ metadata.gz: 232bced785428a91e7638a049331d4f5df83974e
4
+ data.tar.gz: 23620f39d27521174900856190b6ced9d3715427
5
5
  SHA512:
6
- metadata.gz: 62b558973eb617a8cc52c44b222babfaf8315433385265deea21abca52cbd5994146befbfbb785bc3878663aa2e2fc053fe101bf7e0982c0464f06d9114e9b41
7
- data.tar.gz: e86031b3635268f92f19f9e17f2a1619a0729e01c3bde9652f26097c24a3a9665335b4a49d6a5840ade33d7690d41c17a3d27088d08166b54e0aad1ca111d680
6
+ metadata.gz: 8f5fe521ffeb36fe836b331bf7f7d9b2888e6aa27ff4873224a6084de055289fa19258b47bdc9d49acae5495834a46834001ee81f2cdbcb8cd85e8fa75f84cf3
7
+ data.tar.gz: 5c80d1a9b238bc452c67fee28739238c385dc28c4641dadec6dbfe0f4408e5c0cc1f0e18d4c2df51fa9ee3d0d1c9b790d5d3f929bd1d3255241451248f591353
@@ -1,4 +1,8 @@
1
1
 
2
+ ## 2.8.1 - October 27, 2017
3
+
4
+ - Avoid crash with invalid XML passed to Oj.parse_obj().
5
+
2
6
  ## 2.8.0 - September 22, 2017
3
7
 
4
8
  - Added :skip_off mode to make sax callback on every none empty string even
data/README.md CHANGED
@@ -6,7 +6,7 @@ A fast XML parser and Object marshaller as a Ruby gem.
6
6
 
7
7
  ## Documentation
8
8
 
9
- *Documentation*: http://www.ohler.com/ox/doc
9
+ *Documentation*: http://www.ohler.com/ox
10
10
 
11
11
  ## Source
12
12
 
@@ -22,6 +22,10 @@ A fast XML parser and Object marshaller as a Ruby gem.
22
22
 
23
23
  [![Build Status](https://secure.travis-ci.org/ohler55/ox.png?branch=master)](http://travis-ci.org/ohler55/ox)
24
24
 
25
+ ## Donate
26
+
27
+ [![Gratipay](https://img.shields.io/gratipay/project/ox.svg)](https://gratipay.com/ox/)
28
+
25
29
  ## Links of Interest
26
30
 
27
31
  [Ruby XML Gem Comparison](http://www.ohler.com/dev/xml_with_ruby/xml_with_ruby.html) for a performance comparison between Ox, Nokogiri, and LibXML.
@@ -17,7 +17,11 @@ ox_err_set(Err e, VALUE clas, const char *format, ...) {
17
17
  va_end(ap);
18
18
  }
19
19
 
20
+ #if __GNUC__ > 4
20
21
  _Noreturn void
22
+ #else
23
+ void
24
+ #endif
21
25
  ox_err_raise(Err e) {
22
26
  rb_raise(e->clas, "%s", e->msg);
23
27
  }
@@ -776,8 +776,10 @@ end_element(PInfo pi, const char *ename) {
776
776
  Helper gh;
777
777
 
778
778
  helper_stack_pop(&pi->helpers);
779
- gh = helper_stack_peek(&pi->helpers);
780
-
779
+ if (NULL == (gh = helper_stack_peek(&pi->helpers))) {
780
+ set_error(&pi->err, "Corrupt parse stack, container is wrong type", pi->str, pi->s);
781
+ return;
782
+ }
781
783
  rb_hash_aset(gh->obj, ph->obj, h->obj);
782
784
  }
783
785
  break;
@@ -1514,7 +1514,11 @@ void Init_ox() {
1514
1514
  #endif
1515
1515
  }
1516
1516
 
1517
+ #if __GNUC__ > 4
1517
1518
  _Noreturn void
1519
+ #else
1520
+ void
1521
+ #endif
1518
1522
  _ox_raise_error(const char *msg, const char *xml, const char *current, const char* file, int line) {
1519
1523
  int xline = 1;
1520
1524
  int col = 1;
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Ox
3
3
  # Current version of the module.
4
- VERSION = '2.8.0'
4
+ VERSION = '2.8.1'
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.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-22 00:00:00.000000000 Z
11
+ date: 2017-10-27 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
14
14
  \ \nOptimized XML (Ox), as the name implies was written to provide speed