redns 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/lib/redns/message.rb CHANGED
@@ -129,6 +129,8 @@ class ReDNS::Message < ReDNS::Fragment
129
129
  end
130
130
 
131
131
  def deserialize(buffer)
132
+ return unless (buffer)
133
+
132
134
  data = buffer.unpack("nnnnnn")
133
135
 
134
136
  self.id = data.shift
data/lib/redns/name.rb CHANGED
@@ -67,8 +67,12 @@ class ReDNS::Name < ReDNS::Fragment
67
67
  elsif (c == 0)
68
68
  break
69
69
  else
70
- name << buffer.read(c)
71
- name << '.'
70
+ if (read = buffer.read(c))
71
+ name << read
72
+ name << '.'
73
+ else
74
+ break
75
+ end
72
76
  end
73
77
  end
74
78
 
data/redns.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{redns}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["tadman"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - tadman