projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20c636e
)
Check that the cmdline file is not empty
author
Alexander Popov
<alex.popov@linux.com>
Sun, 2 Jun 2024 16:59:36 +0000
(19:59 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Sun, 2 Jun 2024 16:59:36 +0000
(19:59 +0300)
kernel_hardening_checker/__init__.py
patch
|
blob
|
history
diff --git
a/kernel_hardening_checker/__init__.py
b/kernel_hardening_checker/__init__.py
index 67e02690bee12aa8b6934f5ec3c7ee91cab044c0..5893fab542ddd3e16e1b22a55f86e5e21e1ab258 100644
(file)
--- a/
kernel_hardening_checker/__init__.py
+++ b/
kernel_hardening_checker/__init__.py
@@
-174,6
+174,9
@@
def parse_cmdline_file(mode: StrOrNone, parsed_options: Dict[str, str], fname: s
with open(fname, 'r', encoding='utf-8') as f:
line = f.readline()
+ if not line:
+ sys.exit(f'[!] ERROR: empty "{fname}"')
+
opts = line.split()
line = f.readline()