Changeset 216095 in webkit


Ignore:
Timestamp:
May 2, 2017 2:24:58 PM (7 years ago)
Author:
ddkilzer@apple.com
Message:

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.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r216093 r216095  
     12017-05-02  David Kilzer  <ddkilzer@apple.com>
     2
     3        Stop using strcpy() in WebProcess::registerWithStateDumper() in WebProcessCocoa.mm
     4        <https://webkit.org/b/171520>
     5
     6        Reviewed by Chris Dumez.
     7
     8        * WebProcess/cocoa/WebProcessCocoa.mm:
     9        (WebKit::WebProcess::registerWithStateDumper): Switch from
     10        strcpy() to strlcpy(), removing comment in the process.
     11
    1122017-05-02  Andrew Gold  <agold@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm

    r216020 r216095  
    284284                os_state->osd_type = OS_STATE_DATA_SERIALIZED_NSCF_OBJECT;
    285285                os_state->osd_data_size = data.length;
    286                 strcpy(os_state->osd_title, "WebContent state"); // NB: Only 64 bytes of buffer here.
     286                strlcpy(os_state->osd_title, "WebContent state", sizeof(os_state->osd_title));
    287287                memcpy(os_state->osd_data, data.bytes, data.length);
    288288            }
Note: See TracChangeset for help on using the changeset viewer.