[vm] Fix warning on newer GCC.
TEST=local build Change-Id: Ic54b6bd6ae53cd4b5ef6dfa3d57ce05d8dff1755 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488522 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
committed by
Commit Queue
parent
a5bcbf8c1a
commit
28f94515fe
@@ -4891,7 +4891,7 @@ static void AddVMMappings(JSONArray* rss_children) {
|
||||
continue; // Malformed input.
|
||||
}
|
||||
|
||||
strncpy(path, path_start, sizeof(path) - 1);
|
||||
strncpy(path, path_start, sizeof(path));
|
||||
path[sizeof(path) - 1] = '\0';
|
||||
int len = strlen(path);
|
||||
if ((len > 0) && path[len - 1] == '\n') {
|
||||
@@ -4921,7 +4921,7 @@ static void AddVMMappings(JSONArray* rss_children) {
|
||||
}
|
||||
if (!updated) {
|
||||
VMMapping mapping;
|
||||
strncpy(mapping.path, path, sizeof(mapping.path) - 1);
|
||||
strncpy(mapping.path, path, sizeof(mapping.path));
|
||||
mapping.path[sizeof(mapping.path) - 1] = '\0';
|
||||
mapping.size = size;
|
||||
mappings.Add(mapping);
|
||||
|
||||
Reference in New Issue
Block a user