strings: fix data corruption in Base64Escape due to aliasing#2017
Closed
Aspen-coder wants to merge 1 commit intoabseil:masterfrom
Closed
strings: fix data corruption in Base64Escape due to aliasing#2017Aspen-coder wants to merge 1 commit intoabseil:masterfrom
Aspen-coder wants to merge 1 commit intoabseil:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
00d364b to
c9257e8
Compare
|
Hi
…On Sat, 14 Feb 2026, 21:54 google-cla[bot], ***@***.***> wrote:
*google-cla[bot]* left a comment (abseil/abseil-cpp#2017)
<#2017 (comment)>
Thanks for your pull request! It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation
<https://github.com/abseil/abseil-cpp/pull/2017/checks?check_run_id=63628418291>
of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of
the pull request.
—
Reply to this email directly, view it on GitHub
<#2017 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B53FOQZ2I3IMZQ4IS6W4RBT4L5CDTAVCNFSM6AAAAACVELV6H2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSMBSGEYTANJRHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Member
|
Thanks for your interest in Abseil. A preferred fix for this issue has already been submitted: 586a3fb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Addressed a data corruption bug in the pointer-based overloads of Base64Escape and WebSafeBase64Escape.
For a full description (as well as comments that led me to the solution), see: #2015
The Problem:
When the input string_view aliases the destination std::string, the internal implementation can potentially overwrite the source data before the encoding is complete, leading to corrupted output / undefined behavior.
The Fix:
Modified the implementation to route these calls through the string-returning overloads.
Testing:
Added a regression test Base64Escape.AliasingSafety in absl/strings/escaping_test.cc. Verified passing with bazel test //absl/strings:escaping_test.