这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@derekmauro
Copy link
Member

The APIs for the two-range absl::c_mismatch, absl::c_swap_ranges,
and absl::c_transform are misleading as they do not check the bounds
of the second range against the first one.

This commit cleans up ensures that buggy calls are not exploitable;
non-buggy calls are unaffected.

This is consistent with both C++14's two-range std:: equivalents and
C++20's std::ranges:: equivalents.
http://wg21.link/mismatch
http://wg21.link/alg.swap
http://wg21.link/alg.transform

The APIs for the two-range `absl::c_mismatch`, `absl::c_swap_ranges`,
and `absl::c_transform` are misleading as they do not check the bounds
of the second range against the first one.

This commit cleans up ensures that buggy calls are not exploitable;
non-buggy calls are unaffected.

This is consistent with both C++14's two-range `std::` equivalents and
C++20's `std::ranges::` equivalents.
http://wg21.link/mismatch
http://wg21.link/alg.swap
http://wg21.link/alg.transform
@google-cla google-cla bot added the cla: yes label Oct 9, 2020
@derekmauro derekmauro requested a review from rogeeff October 9, 2020 17:12
@derekmauro derekmauro merged commit f1dad1e into abseil:lts_2020_02_25 Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants