Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Stop using strcpy() in WebProcess::registerWithStateDumper() in WebPr…
…ocessCocoa.mm

<https://webkit.org/b/171520>

Reviewed by Chris Dumez.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::registerWithStateDumper): Switch from
strcpy() to strlcpy(), removing comment in the process.


Canonical link: https://commits.webkit.org/188482@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ddkilzer committed May 2, 2017
1 parent 90f2ba3 commit da58a74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,14 @@
2017-05-02 David Kilzer <ddkilzer@apple.com>

Stop using strcpy() in WebProcess::registerWithStateDumper() in WebProcessCocoa.mm
<https://webkit.org/b/171520>

Reviewed by Chris Dumez.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::registerWithStateDumper): Switch from
strcpy() to strlcpy(), removing comment in the process.

2017-05-02 Andrew Gold <agold@apple.com>

MediaDevices is not enabled for MobileSafari
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm
Expand Up @@ -283,7 +283,7 @@ static void registerWithAccessibility()
memset(os_state, 0, neededSize);
os_state->osd_type = OS_STATE_DATA_SERIALIZED_NSCF_OBJECT;
os_state->osd_data_size = data.length;
strcpy(os_state->osd_title, "WebContent state"); // NB: Only 64 bytes of buffer here.
strlcpy(os_state->osd_title, "WebContent state", sizeof(os_state->osd_title));
memcpy(os_state->osd_data, data.bytes, data.length);
}

Expand Down

0 comments on commit da58a74

Please sign in to comment.