roll: third_party/pigweed: pw_multibuf: Restructure ChunkIterable
MultiBuf is a byte-oriented view of a list of chunks, and this change
structures MultiBuf accordingly. This replaces the ChunkIterable class
with a private MultiBufChunks base class that provides the
Chunk-oriented view for MultiBuf.
Restructuring this way fixes an issue where MultiBuf data can be
modified from a const reference. MultiBuf originally returned a const
ChunkIterable, but since return values are copied, this becomes a
non-const ChunkIterable, giving mutable access to the multibuf.
const MultiBuf& const_mb = mb;
auto chunk_iterable = cmb.Chunks(); // chunk_iterable is non-const
iterable.front()[0] = std::byte(); // uh oh, chunk data is mutable!
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/230892
https://pigweed.googlesource.com/pigweed/pigweed
third_party/pigweed Rolled-Commits: 03da4a376d12ab8..7e7c141c8808200
Roller-URL: https://ci.chromium.org/b/8739054205463833265
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I1d21812f80243018e858543f2144910ae7be9053
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/experimental/+/230972
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
diff --git a/third_party/pigweed b/third_party/pigweed
index 03da4a3..7e7c141 160000
--- a/third_party/pigweed
+++ b/third_party/pigweed
@@ -1 +1 @@
-Subproject commit 03da4a376d12ab8173f250a14f703ae8a1571d3c
+Subproject commit 7e7c141c88082004fa8ae3682bf37f3a8229af11