<?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>21845</bug_id>
          
          <creation_ts>2008-10-23 17:57:40 -0700</creation_ts>
          <short_desc>m_frame null checked but then dereferenced</short_desc>
          <delta_ts>2008-10-23 18:05:39 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Fisher (:fishd, Google)">fishd</reporter>
          <assigned_to name="Darin Fisher (:fishd, Google)">fishd</assigned_to>
          <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>96459</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2008-10-23 17:57:40 -0700</bug_when>
    <thetext>m_frame null checked but then dereferenced

in EventHandler::allowDHTMLDrag, it appears that a return statement is missing.

it looks like this code was introduced in http://trac.webkit.org/changeset/19230 

this was found using a static analysis tool.  i don&apos;t know if it is actually possible for m_frame to be null, so i don&apos;t know how to judge the severity of this bug.  maybe the null checking code should just be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96462</commentid>
    <comment_count>1</comment_count>
      <attachid>24629</attachid>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2008-10-23 17:59:53 -0700</bug_when>
    <thetext>Created attachment 24629
v1 patch: add early return</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96464</commentid>
    <comment_count>2</comment_count>
      <attachid>24629</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-10-23 18:01:12 -0700</bug_when>
    <thetext>Comment on attachment 24629
v1 patch: add early return

This looks to me like what the author intended in their original code.  Certainly the existing code is incorrect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96465</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-10-23 18:01:53 -0700</bug_when>
    <thetext>Please add a comment to your changelog when landing about how this was found using a static analysis tool and thus there are no reproduction steps for a test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96466</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2008-10-23 18:05:39 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/37834</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>24629</attachid>
            <date>2008-10-23 17:59:53 -0700</date>
            <delta_ts>2008-10-23 18:01:12 -0700</delta_ts>
            <desc>v1 patch: add early return</desc>
            <filename>early_return_1.diff</filename>
            <type>text/plain</type>
            <size>1069</size>
            <attacher name="Darin Fisher (:fishd, Google)">fishd</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDM3ODMz
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMDgtMTAt
MjMgIERhcmluIEZpc2hlciAgPGRhcmluQGNocm9taXVtLm9yZ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+
dmlldygpLT5jb250ZW50c1RvV2luZG93KG1fbW91c2VEb3duUG9zKSk7Cg==
</data>
<flag name="review"
          id="11246"
          type_id="1"
          status="+"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>