0

Fix unsafe buffer usage in http_network_transaction.cc.

Bug: 40284755
Change-Id: I862db6e0c7174c10d6407bf86eed17319b63f04d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6254679
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418973}
This commit is contained in:
Matt Menke
2025-02-11 16:02:37 -08:00
committed by Chromium LUCI CQ
parent 72cff7fcf2
commit 47b6b55954
2 changed files with 3 additions and 7 deletions

@ -2,11 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif
#include "net/http/http_network_transaction.h"
#include <set>

@ -7,6 +7,7 @@
#include <stdint.h>
#include <array>
#include <memory>
#include <optional>
#include <string>
@ -366,8 +367,8 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
static void SetProxyInfoInResponse(const ProxyInfo& proxy_info,
HttpResponseInfo* response_info);
scoped_refptr<HttpAuthController>
auth_controllers_[HttpAuth::AUTH_NUM_TARGETS];
std::array<scoped_refptr<HttpAuthController>, HttpAuth::AUTH_NUM_TARGETS>
auth_controllers_;
// Whether this transaction is waiting for proxy auth, server auth, or is
// not waiting for any auth at all. |pending_auth_target_| is read and