rpatricia 0.08 → 0.09
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes +4 -1
- data/ext/rpatricia/patricia.c +5 -3
- data/rpatricia.gemspec +1 -1
- metadata +5 -5
data/Changes
CHANGED
data/ext/rpatricia/patricia.c
CHANGED
@@ -170,12 +170,14 @@ ascii2prefix(char *string, prefix_t *prefix)
|
|
170
170
|
slash = memchr(string, '/', len);
|
171
171
|
if (slash) {
|
172
172
|
bitlen = strtol(slash + 1, &end, 10);
|
173
|
-
|
173
|
+
len = slash - string;
|
174
|
+
|
175
|
+
if (*end || (bitlen < 0) || len >= sizeof(save))
|
174
176
|
return NULL;
|
175
177
|
|
176
178
|
/* copy the string to save. Avoid destroying the string */
|
177
|
-
memcpy(save, string,
|
178
|
-
save[
|
179
|
+
memcpy(save, string, len);
|
180
|
+
save[len] = '\0';
|
179
181
|
string = save;
|
180
182
|
} else {
|
181
183
|
bitlen = -1;
|
data/rpatricia.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = %q{rpatricia}
|
6
|
-
s.version = %q{0.
|
6
|
+
s.version = %q{0.09} # remember to update Changes if this is changed
|
7
7
|
|
8
8
|
s.homepage = "http://www.goto.info.waseda.ac.jp/~tatsuya/rpatricia/"
|
9
9
|
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpatricia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 9
|
9
|
+
version: "0.09"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Tatsuya Mori
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-07-31 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: |-
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements: []
|
75
75
|
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 1.8.
|
77
|
+
rubygems_version: 1.8.24
|
78
78
|
signing_key:
|
79
79
|
specification_version: 3
|
80
80
|
summary: module for fast IP address/prefix lookups
|