<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>43139</bug_id>
          
          <creation_ts>2010-07-28 12:49:37 -0700</creation_ts>
          <short_desc>cross_fuzz window.styleMedia.matchMedium() NULL pointer with open document</short_desc>
          <delta_ts>2010-08-07 14:50:46 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows Vista</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>43677</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>42959</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Berend-Jan Wever">skylined</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>eric</cc>
    
    <cc>lcamtuf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>257302</commentid>
    <comment_count>0</comment_count>
      <attachid>62863</attachid>
    <who name="Berend-Jan Wever">skylined</who>
    <bug_when>2010-07-28 12:49:37 -0700</bug_when>
    <thetext>Created attachment 62863
Repro case

Found as part of cross_fuzz investigation
Repro:
  &lt;body onload=&quot;document.open();window.styleMedia.matchMedium();&quot;&gt;

id:             WebCore::CSSStyleSelector::styleForElement ReadAV@NULL (dc7b32067c1b2c657a6337dd1beb1998)
description:    Attempt to read from NULL pointer (+0x24) in WebCore::CSSStyleSelector::styleForElement
stack:          WebCore::CSSStyleSelector::styleForElement
                WebCore::StyleMedia::matchMedium
                WebCore::StyleMediaInternal::matchMediumCallback
                v8::internal::HandleApiCallHelper&lt;...&gt;
                v8::internal::Builtin_HandleApiCall
                v8::internal::Invoke
                v8::internal::Execution::Call
                ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>260470</commentid>
    <comment_count>1</comment_count>
    <who name="Berend-Jan Wever">skylined</who>
    <bug_when>2010-08-05 02:02:40 -0700</bug_when>
    <thetext>Another similar crash, which does not appear to affect latest Chromium:
&lt;body onload=&quot;document.write();window.media.matchMedium();&quot;&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>261790</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-07 14:50:46 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 43677 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>62863</attachid>
            <date>2010-07-28 12:49:37 -0700</date>
            <delta_ts>2010-07-28 12:49:37 -0700</delta_ts>
            <desc>Repro case</desc>
            <filename>repro.html</filename>
            <type>text/html</type>
            <size>65</size>
            <attacher name="Berend-Jan Wever">skylined</attacher>
            
              <data encoding="base64">PGJvZHkgb25sb2FkPSJkb2N1bWVudC5vcGVuKCk7d2luZG93LnN0eWxlTWVkaWEubWF0Y2hNZWRp
dW0oKTsiPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>