<?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>246267</bug_id>
          
          <creation_ts>2022-10-10 01:03:40 -0700</creation_ts>
          <short_desc>[WTF] ASSERT on source pointer before calling memcpy()</short_desc>
          <delta_ts>2022-10-10 09:15:36 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>246260</dup_id>
          
          <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="Philippe Normand">philn</reporter>
          <assigned_to name="Philippe Normand">philn</assigned_to>
          <cc>darin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1904422</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2022-10-10 01:03:40 -0700</bug_when>
    <thetext>As noted in https://bugs.webkit.org/show_bug.cgi?id=245640 in at least one case memcpy() was being called with a null source pointer in StringImpl::copyCharacters(). We should add an ASSERT there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904425</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2022-10-10 01:06:14 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/5180</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904437</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2022-10-10 02:19:34 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 246260 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904505</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-10-10 09:15:36 -0700</bug_when>
    <thetext>Turns out *many* callers are passing nullptr for destination pointer as well as source pointer, so the use of memcpy there is incorrect. I ended up working on a much bigger patch for this, but in the end we might want to land something smaller than what I did.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>