diff options
author | David Gannerud <david@dkrg.se> | 2022-07-08 12:19:11 +0200 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-12-25 07:58:58 -0700 |
commit | eea012472ec3362d97402d2253ccdb09965b9f7f (patch) | |
tree | 9d2b617fbb9a33f9a7612bfec50799d6896b5b65 | |
parent | b97c74331cb00c56cd8bf7ffba17efedbbe5d009 (diff) | |
download | serenity-eea012472ec3362d97402d2253ccdb09965b9f7f.zip |
Ladybird: Prevent loading of invalid URL
Loading invalid URL will result in a crash.
-rw-r--r-- | Ladybird/WebView.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Ladybird/WebView.cpp b/Ladybird/WebView.cpp index 3769a15abe..fb558445cb 100644 --- a/Ladybird/WebView.cpp +++ b/Ladybird/WebView.cpp @@ -80,6 +80,9 @@ public: void load(AK::URL const& url) { + if (!url.is_valid()) + return; + page().load(url); } |