mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
fix a bug where a failed encoder would try to convert nil to Integer. see #519
git-svn-id: file:///home/svn/framework3/trunk@7540 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
9f134512c2
commit
36921e6d4b
@ -108,7 +108,11 @@ class BadcharError < EncodingError
|
||||
else
|
||||
c = char
|
||||
end
|
||||
return "Encoding failed due to a bad character (index=#{index}, char=#{sprintf("0x%.2x", c)})"
|
||||
if (c)
|
||||
return "Encoding failed due to a bad character (index=#{index}, char=#{sprintf("0x%.2x", c)})"
|
||||
else
|
||||
return "Encoding failed due to a nil character"
|
||||
end
|
||||
end
|
||||
|
||||
attr_reader :buf, :index, :stub_size, :char
|
||||
|
Loading…
Reference in New Issue
Block a user