cbor 0.5.9.4 → 0.5.9.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/.travis.yml +3 -6
- data/cbor.gemspec +1 -1
- data/ext/cbor/unpacker.c +1 -1
- data/lib/cbor/version.rb +1 -1
- data/spec/format_spec.rb +19 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec3ff9c80d1ebf61154f6adbd475eb487748e3ddb738d55d914802a37e4ff608
|
4
|
+
data.tar.gz: f1210b308bb2a4207578d82e8538a43994e99779bc7bb44a17a6e63d01c7c5d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b21900c2b783d18fb4089d6d9a9a04cc5973d00bee14031364ff6b0107afefa4939ada64fe27ceb6eb75fb5b4aef7e5194163050fc7e1ee0d575456347ca20a
|
7
|
+
data.tar.gz: f8e01fd9cb3ba019f63a67d561cc4267f64868a53befa2e925e979ed107de315e4add952e56e516a26ce28bbad656d3ae1f873c75e920f47350d8197c635929d
|
data/.travis.yml
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 1.9.3
|
4
3
|
- 2.0.0
|
5
4
|
- 2.1.10
|
6
5
|
- 2.2.10
|
@@ -8,14 +7,12 @@ rvm:
|
|
8
7
|
- 2.4.4
|
9
8
|
- 2.5.1
|
10
9
|
- ruby-head
|
11
|
-
- rbx-2
|
12
|
-
- 1.8.7
|
13
10
|
matrix:
|
14
11
|
allow_failures:
|
12
|
+
- rvm: 2.0.0
|
13
|
+
- rvm: 2.1.10
|
14
|
+
- rvm: 2.2.10
|
15
15
|
- rvm: ruby-head
|
16
|
-
- rvm: rbx-2
|
17
|
-
- rvm: 1.8.7
|
18
|
-
- rvm: 1.9.3
|
19
16
|
|
20
17
|
gemfile:
|
21
18
|
- Gemfile
|
data/cbor.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.extensions = ["ext/cbor/extconf.rb"]
|
18
18
|
|
19
|
-
s.add_development_dependency 'bundler', ['~> 1.0']
|
19
|
+
s.add_development_dependency 'bundler', RUBY_VERSION.to_f < 2.3 ? ['~> 1.0'] : ['~> 2.0']
|
20
20
|
s.add_development_dependency 'rake', ['~> 0.9.2']
|
21
21
|
s.add_development_dependency 'rake-compiler', ['~> 0.8.3']
|
22
22
|
s.add_development_dependency 'rspec', ['~> 2.11']
|
data/ext/cbor/unpacker.c
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
* by limiting preallocation to about a Tebibyte
|
34
34
|
* limit is 2**n-1 (n==10) so we can avoid a conditional
|
35
35
|
*/
|
36
|
-
#define SANE_PREALLOCATION_MAX
|
36
|
+
#define SANE_PREALLOCATION_MAX 0xFFFFFFFUL
|
37
37
|
#define SANE_PREALLOCATE(n) (n & SANE_PREALLOCATION_MAX)
|
38
38
|
|
39
39
|
#if !defined(DISABLE_RMEM) && !defined(DISABLE_UNPACKER_STACK_RMEM) && \
|
data/lib/cbor/version.rb
CHANGED
data/spec/format_spec.rb
CHANGED
@@ -421,7 +421,7 @@ describe MessagePack do
|
|
421
421
|
unpacker.feed(CBOR.encode(symbolized_hash)).read.should == symbolized_hash
|
422
422
|
end
|
423
423
|
|
424
|
-
it 'handle outrageous sizes' do
|
424
|
+
it 'handle outrageous sizes 1' do
|
425
425
|
expect { CBOR.decode("\xa1") }.to raise_error(EOFError)
|
426
426
|
expect { CBOR.decode("\xba\xff\xff\xff\xff") }.to raise_error(EOFError)
|
427
427
|
expect { CBOR.decode("\xbb\xff\xff\xff\xff\xff\xff\xff\xff") }.to raise_error(EOFError)
|
@@ -429,18 +429,36 @@ describe MessagePack do
|
|
429
429
|
expect { CBOR.decode("\xbb\x00\x00\x01\x01\x01\x01\x01\x01") }.to raise_error(EOFError)
|
430
430
|
expect { CBOR.decode("\x81") }.to raise_error(EOFError)
|
431
431
|
expect { CBOR.decode("\x9a\xff\xff\xff\xff") }.to raise_error(EOFError)
|
432
|
+
end
|
433
|
+
it 'handle outrageous sizes 2' do
|
432
434
|
expect { CBOR.decode("\x9b\xff\xff\xff\xff\xff\xff\xff\xff") }.to raise_error(EOFError)
|
435
|
+
end
|
436
|
+
it 'handle outrageous sizes 3' do
|
433
437
|
expect { CBOR.decode("\x9b\x01\x01\x01\x01\x01\x01\x01\x01") }.to raise_error(EOFError)
|
438
|
+
end
|
439
|
+
it 'handle outrageous sizes 4' do
|
434
440
|
expect { CBOR.decode("\x9b\x00\x00\x01\x01\x01\x01\x01\x01") }.to raise_error(EOFError)
|
435
441
|
expect { CBOR.decode("\x61") }.to raise_error(EOFError)
|
436
442
|
expect { CBOR.decode("\x7a\xff\xff\xff\xff") }.to raise_error(EOFError)
|
443
|
+
end
|
444
|
+
it 'handle outrageous sizes 5' do
|
437
445
|
expect { CBOR.decode("\x7b\xff\xff\xff\xff\xff\xff\xff\xff") }.to raise_error(EOFError)
|
446
|
+
end
|
447
|
+
it 'handle outrageous sizes 6' do
|
438
448
|
expect { CBOR.decode("\x7b\x01\x01\x01\x01\x01\x01\x01\x01") }.to raise_error(EOFError)
|
449
|
+
end
|
450
|
+
it 'handle outrageous sizes 7' do
|
439
451
|
expect { CBOR.decode("\x7b\x00\x00\x01\x01\x01\x01\x01\x01") }.to raise_error(EOFError)
|
440
452
|
expect { CBOR.decode("\x41") }.to raise_error(EOFError)
|
441
453
|
expect { CBOR.decode("\x5a\xff\xff\xff\xff") }.to raise_error(EOFError)
|
454
|
+
end
|
455
|
+
it 'handle outrageous sizes 8' do
|
442
456
|
expect { CBOR.decode("\x5b\xff\xff\xff\xff\xff\xff\xff\xff") }.to raise_error(EOFError)
|
457
|
+
end
|
458
|
+
it 'handle outrageous sizes 9' do
|
443
459
|
expect { CBOR.decode("\x5b\x01\x01\x01\x01\x01\x01\x01\x01") }.to raise_error(EOFError)
|
460
|
+
end
|
461
|
+
it 'handle outrageous sizes 10' do
|
444
462
|
expect { CBOR.decode("\x5b\x00\x00\x01\x01\x01\x01\x01\x01") }.to raise_error(EOFError)
|
445
463
|
end
|
446
464
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cbor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.9.
|
4
|
+
version: 0.5.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann, standing on the tall shoulders of Sadayuki Furuhashi
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|