Skip to content

Commit

Permalink
prevent serverspec from hanging if checking a DWORD that doesn't cont…
Browse files Browse the repository at this point in the history
…ain 8 characters
  • Loading branch information
Edmund Dipple committed Feb 10, 2014
1 parent fe11629 commit 1bb24f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/specinfra/command/windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def convert_key_property_value property
byte_array = [property[:value]].pack('H*').bytes.to_a
"([byte[]] #{byte_array.join(',')})"
when :type_dword
[property[:value].scan(/[0-9a-f]{2}/i).reverse.join].pack("H*").unpack("l").first
[property[:value].rjust(8, '0').scan(/[0-9a-f]{2}/i).reverse.join].pack("H*").unpack("l").first
when :type_qword
property[:value].hex
else
Expand Down

0 comments on commit 1bb24f8

Please sign in to comment.