Skip to content

Commit

Permalink
CSP: Limit origin length in fuzzer
Browse files Browse the repository at this point in the history
This limits the length of the url used as input for the origin in the
content security policy conversion_util_fuzzer.cc. An domain name is
limited to 253 characters anyway.

Cf. also https://crrev.com/c/2659117

Note: this is a fix for a previously committed CL
https://crrev.com/c/2854743, where by mistake I ended up deleting a
line.

Bug: 1203443
Change-Id: I1e349e3ee597c779db80fba4eae7cb0a96c7a1b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2859859
Commit-Queue: Arthur Sonzogni <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/master@{#877939}
NOKEYCHECK=True
GitOrigin-RevId: 5dcb9c70a8a27dd8e97521b01d3957c9a7dd0b7b
  • Loading branch information
antosart authored and copybara-github committed Apr 30, 2021
1 parent 27d5056 commit 6b38c6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions blink/renderer/core/frame/csp/conversion_util_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Due to this quadratic behavior, we must limit the size of the origin to
// prevent the fuzzer from triggering OOM crash. Note that real domain names
// are limited to 253 characters.
return EXIT_SUCCESS;
}

String url = String(data, it - 1 - data);
Expand Down

0 comments on commit 6b38c6d

Please sign in to comment.