Skip to content

Commit 3aee02a

Browse files
committed
prevent nil in flags
1 parent 2801dd6 commit 3aee02a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

default/inspec/sysctl_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
impact 1.0
338338
title 'CPU No execution Flag or Kernel ExecShield'
339339
desc 'Kernel features and CPU flags provide a protection against buffer overflows. The CPU NX Flag and the kernel parameter exec-shield prevents code execution on a per memory page basis. If the CPU supports the NX-Flag then this should be used instead of the kernel parameter exec-shield.'
340-
flags = parse_config_file('/proc/cpuinfo', assignment_re: /^([^:]*?)\s+:\s+(.*?)$/).flags.split(' ')
340+
flags = parse_config_file('/proc/cpuinfo', assignment_re: /^([^:]*?)\s+:\s+(.*?)$/).flags.to_s.split(' ')
341341
describe '/proc/cpuinfo' do
342342
it 'Flags should include NX' do
343343
expect(flags).to include('nx')

0 commit comments

Comments
 (0)