1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-09 04:26:11 +02:00

Fix #5596 by catching RuntimeError from Rex::Poly

This commit is contained in:
HD Moore 2015-06-24 10:34:50 -07:00 committed by Joshua Smith
parent 827d241482
commit cea8605365

View File

@ -281,8 +281,9 @@ protected
begin
# Generate a permutation saving the ECX, ESP, and user defined registers
loop_inst.generate(block_generator_register_blacklist, nil, state.badchars)
rescue EncodingError => e
raise EncodingError
rescue RuntimeError, EncodingError => e
# The Rex::Poly block generator can raise RuntimeError variants
raise EncodingError, e.to_s
end
end