<?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>130900</bug_id>
          
          <creation_ts>2014-03-28 10:04:36 -0700</creation_ts>
          <short_desc>Null pointer crash in String::append(UChar).</short_desc>
          <delta_ts>2014-03-28 10:59:27 -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>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>peavo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>msaboff</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>995361</commentid>
    <comment_count>0</comment_count>
    <who name="">peavo</who>
    <bug_when>2014-03-28 10:04:36 -0700</bug_when>
    <thetext>A couple of days ago, I was getting many null pointer crashes in String::append(UChar).
This can happen if the string is empty (m_impl member == 0), and it is called with a character value less than or equal to 0xff.
In the first line of the method, the is8Bit() method will then be called, which accesses the m_impl member, which is null, causing a crash.
This can be fixed by first checking if the m_impl member is null, in the same way as in the method String::append(LChar).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>995368</commentid>
    <comment_count>1</comment_count>
      <attachid>228061</attachid>
    <who name="">peavo</who>
    <bug_when>2014-03-28 10:11:06 -0700</bug_when>
    <thetext>Created attachment 228061
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>995373</commentid>
    <comment_count>2</comment_count>
      <attachid>228061</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-03-28 10:22:08 -0700</bug_when>
    <thetext>Comment on attachment 228061
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>995375</commentid>
    <comment_count>3</comment_count>
    <who name="">peavo</who>
    <bug_when>2014-03-28 10:29:11 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 228061 [details])
&gt; r=me

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>995393</commentid>
    <comment_count>4</comment_count>
      <attachid>228061</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-03-28 10:59:23 -0700</bug_when>
    <thetext>Comment on attachment 228061
Patch

Clearing flags on attachment: 228061

Committed r166414: &lt;http://trac.webkit.org/changeset/166414&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>995394</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-03-28 10:59:27 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>228061</attachid>
            <date>2014-03-28 10:11:06 -0700</date>
            <delta_ts>2014-03-28 10:59:23 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-130900-20140328181027.patch</filename>
            <type>text/plain</type>
            <size>1458</size>
            <attacher>peavo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS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NRTogVGhpcyBpcyBleHRyZW1lbHkgaW5lZmZpY2llbnQuIFNvIG11
Y2ggc28gdGhhdCB3ZSBtaWdodCB3YW50IHRvIHRha2UgdGhpcyBvdXQgb2YgU3RyaW5nJ3MgQVBJ
LgogCi0gICAgaWYgKGNoYXJhY3RlciA8PSAweEZGICYmIGlzOEJpdCgpKSB7Ci0gICAgICAgIGFw
cGVuZChzdGF0aWNfY2FzdDxMQ2hhcj4oY2hhcmFjdGVyKSk7Ci0gICAgICAgIHJldHVybjsKLSAg
ICB9CiAgICAgaWYgKCFtX2ltcGwpIHsKICAgICAgICAgbV9pbXBsID0gU3RyaW5nSW1wbDo6Y3Jl
YXRlKCZjaGFyYWN0ZXIsIDEpOwogICAgICAgICByZXR1cm47CiAgICAgfQorICAgIGlmIChjaGFy
YWN0ZXIgPD0gMHhGRiAmJiBpczhCaXQoKSkgeworICAgICAgICBhcHBlbmQoc3RhdGljX2Nhc3Q8
TENoYXI+KGNoYXJhY3RlcikpOworICAgICAgICByZXR1cm47CisgICAgfQogICAgIGlmIChtX2lt
cGwtPmxlbmd0aCgpID49IHN0ZDo6bnVtZXJpY19saW1pdHM8dW5zaWduZWQ+OjptYXgoKSkKICAg
ICAgICAgQ1JBU0goKTsKICAgICBVQ2hhciogZGF0YTsK
</data>

          </attachment>
      

    </bug>

</bugzilla>