Remove a variable-length array to enable compiling with -Wvla

Change-Id: I721f1dccc7e1188631a57f435c5c097ff83853b8
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2363768
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Mark Mentovai 2020-08-18 16:56:02 -04:00 committed by Commit Bot
parent ebab28f30d
commit 1509aadd63

View File

@ -14,8 +14,11 @@
#include "snapshot/sanitized/process_snapshot_sanitized.h"
#include <string.h>
#include "base/macros.h"
#include "base/notreached.h"
#include "base/stl_util.h"
#include "build/build_config.h"
#include "gtest/gtest.h"
#include "test/multiprocess_exec.h"
@ -98,7 +101,7 @@ void ChildTestFunction() {
static StringAnnotation<32> non_allowed_annotation(kNonAllowedAnnotationName);
non_allowed_annotation.Set(kNonAllowedAnnotationValue);
char string_data[strlen(kSensitiveStackData) + 1];
char string_data[base::size(kSensitiveStackData)];
strcpy(string_data, kSensitiveStackData);
void (*code_pointer)(void) = ChildTestFunction;