Bug 246267 - [WTF] ASSERT on source pointer before calling memcpy()
Summary: [WTF] ASSERT on source pointer before calling memcpy()
Status: RESOLVED DUPLICATE of bug 246260
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-10 01:03 PDT by Philippe Normand
Modified: 2022-10-10 09:15 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2022-10-10 01:03:40 PDT
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.
Comment 1 Philippe Normand 2022-10-10 01:06:14 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5180
Comment 2 Philippe Normand 2022-10-10 02:19:34 PDT

*** This bug has been marked as a duplicate of bug 246260 ***
Comment 3 Darin Adler 2022-10-10 09:15:36 PDT
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.