Commit 5b88ee08 by Alexander Popov

Add a sanity check and do minor refactoring

parent 0b8e9770
...@@ -101,9 +101,12 @@ class OR(ComplexOptCheck): ...@@ -101,9 +101,12 @@ class OR(ComplexOptCheck):
# OR(<X_is_hardened>, <X_is_hardened_old>) # OR(<X_is_hardened>, <X_is_hardened_old>)
def check(self): def check(self):
if not self.opts:
sys.exit('[!] ERROR: invalid OR check')
for i, opt in enumerate(self.opts): for i, opt in enumerate(self.opts):
result, msg = opt.check() ret, msg = opt.check()
if result: if ret:
if i == 0: if i == 0:
self.result = opt.result self.result = opt.result
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment