summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorsin-ack <sin-ack@users.noreply.github.com>2022-07-11 19:53:29 +0000
committerAndreas Kling <kling@serenityos.org>2022-07-12 23:11:35 +0200
commitc70f45ff4498fcb7ce0671e9107ecff8009d7eb2 (patch)
tree6250cc4ba6c43ed57639f3d7ff9c5fd34800989f /Meta
parente3da0adfe6d278424970dad5a642bda650737e42 (diff)
downloadserenity-c70f45ff4498fcb7ce0671e9107ecff8009d7eb2.zip
Everywhere: Explicitly specify the size in StringView constructors
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
Diffstat (limited to 'Meta')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp
index 15107e5a70..a641334f06 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp
@@ -61,7 +61,7 @@ int main(int argc, char** argv)
.short_name = 'i',
.value_name = "path",
.accept_value = [&](char const* s) {
- s_header_search_paths.append(s);
+ s_header_search_paths.append({ s, strlen(s) });
return true;
},
});