Skip to content

Commit

Permalink
Fix Null Dereference in css_parsing_utils
Browse files Browse the repository at this point in the history
This CL addresses a null pointer dereference issue within the
ConsumeColorContrast functions located in css_parsing_utils.cc.
Previously, a null dereference occurred when the code attempted to
retrieve the color provider when the document was null. To resolve
this, the updated code now includes a validation check to ensure the
document object is valid before calling the GetColorProviderForPainting
method.

Bug: 337069153
Change-Id: Ieee6c0e3602b25e8b149c93643e4d55265e4467c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5497219
Reviewed-by: Alison Maher <almaher@microsoft.com>
Commit-Queue: Sam Davis Omekara <samomekarajr@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1304551}
  • Loading branch information
Sam Davis Omekara authored and chromium-wpt-export-bot committed May 22, 2024
1 parent da2dc27 commit 3eb175f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<link rel="help" href="https://crbug.com/337069153">
<script>
var element = document.createElementNS("http://www.w3.org/2000/svg", undefined);
element.style.setProperty('background-color', unescape("color-contrast(red vs deeppink, #008000)"));
</script>

0 comments on commit 3eb175f

Please sign in to comment.