mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Handle zero byte rule files correctly.
This corrects the stalling behaviour seen when trying to parse an empty rule file. Fixes: #1521
This commit is contained in:
parent
945ee27a85
commit
09ee471498
@ -134,6 +134,10 @@ int Driver::parse(const std::string &f, const std::string &ref) {
|
||||
this->ref.push_back(ref);
|
||||
}
|
||||
|
||||
if (f.empty()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
buffer = f;
|
||||
scan_begin();
|
||||
yy::seclang_parser parser(*this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user