Commit 347f71aa authored by Milad Farazmand's avatar Milad Farazmand Committed by Ruben Bridgewater
Browse files

deps: V8: cherry-pick e1eac1b16c96

Original commit message:

    Fix compilation error with devtoolset-8

    We are compiling V8 using devtoolset-8 and it is generating a new
    compilation error related to String Truncation:

    error: ‘char* strncpy(char*, const char*, size_t)’ output truncated copying between 1 and 15 bytes from a string of length 15 [-Werror=stringop-truncation]
              strncpy(buffer, unicode_utf8, i);

    Which basically means the null terminating character was not added to
    the end of the buffer:
    https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/

    This CL will changes 2 uses of "strncpy" to "memcpy" as strings
    are being copied partially and `\n` being added at a later stage.

    Change-Id: I3656afb00463d70ddb8700a487a1978b793e1d09
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2155038


Reviewed-by: default avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: default avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
    Cr-Commit-Position: refs/heads/master@{#67277}

Refs: https://github.com/v8/v8/commit/e1eac1b16c966879102c2310d7649637227eaa02

PR-URL: https://github.com/nodejs/node/pull/32974


Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarUjjwal Sharma <ryzokuken@disroot.org>
parent 99f4af41
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment