mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
Everywhere: Fix format-vulnerabilities
Command used:
grep -Pirn '(out|warn)ln\((?!["\)]|format,|stderr,|stdout,|output, ")' \
AK Kernel/ Tests/ Userland/
(Plus some manual reviewing.)
Let's pick ArgsParser as an example:
outln(file, m_general_help);
This will fail at runtime if the general help happens to contain braces.
Even if this transformation turns out to be unnecessary in a place or
two, this way the code is "more obviously" correct.
This commit is contained in:
parent
7dfecbee44
commit
2e4ec891da
Notes:
sideshowbarker
2024-07-18 04:16:34 +09:00
Author: https://github.com/BenWiederhake
Commit: 2e4ec891da
Pull-request: https://github.com/SerenityOS/serenity/pull/9961
Reviewed-by: https://github.com/linusg ✅
4 changed files with 4 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ RefPtr<SQL::SQLResult> execute(NonnullRefPtr<SQL::Database> database, String con
|
|||
auto statement = parser.next_statement();
|
||||
EXPECT(!parser.has_errors());
|
||||
if (parser.has_errors()) {
|
||||
outln(parser.errors()[0].to_string());
|
||||
outln("{}", parser.errors()[0].to_string());
|
||||
}
|
||||
SQL::AST::ExecutionContext context { database };
|
||||
auto result = statement->execute(context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue