Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@knopp
Copy link
Member

@knopp knopp commented Aug 9, 2024

Fixes flutter/flutter#153157

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@knopp knopp changed the title macOS: Fix crash with out of boudns attributedSubstringForProposedRange macOS: Fix crash with out of bounds in attributedSubstringForProposedRange Aug 9, 2024
@knopp knopp changed the title macOS: Fix crash with out of bounds in attributedSubstringForProposedRange macOS: Fix crash in attributedSubstringForProposedRange with out of bounds range Aug 9, 2024
@knopp knopp requested a review from cbracken August 10, 2024 15:25
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing! I remember adding a ton of mitigations for this sort of things when I wrote the original UITextInput implementation on iOS. I haven't read the equivalent protocol docs for macOS but I imagine that similar to UIKit, AppKit APIs reserve the right to pass you out-of-bounds values that we may not be protecting against :/

LGTM stamp from a Japanese personal seal

@jonahwilliams
Copy link
Contributor

Can we submit this?

@knopp knopp merged commit 5d8ee52 into flutter:main Aug 12, 2024
@knopp knopp deleted the attributed_substring_out_of_range branch August 12, 2024 18:00
@knopp knopp restored the attributed_substring_out_of_range branch August 12, 2024 18:00
@knopp knopp deleted the attributed_substring_out_of_range branch August 12, 2024 18:00
@jonahwilliams
Copy link
Contributor

Thanks!

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 12, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 12, 2024
…153313)

flutter/engine@bcf2dcc...5d8ee52

2024-08-12 [email protected] macOS: Fix crash in attributedSubstringForProposedRange with out of bounds range (flutter/engine#54469)
2024-08-12 [email protected] [Windows] Improve texture format logic (flutter/engine#54329)
2024-08-12 [email protected] Revert "[Impeller] remove scene3d support." (flutter/engine#54502)
2024-08-12 [email protected] Roll Skia from f77adcef7c1c to ec7558d41b34 (1 revision) (flutter/engine#54507)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
DBowen33 pushed a commit to DBowen33/flutter that referenced this pull request Aug 16, 2024
…lutter#153313)

flutter/engine@bcf2dcc...5d8ee52

2024-08-12 [email protected] macOS: Fix crash in attributedSubstringForProposedRange with out of bounds range (flutter/engine#54469)
2024-08-12 [email protected] [Windows] Improve texture format logic (flutter/engine#54329)
2024-08-12 [email protected] Revert "[Impeller] remove scene3d support." (flutter/engine#54502)
2024-08-12 [email protected] Roll Skia from f77adcef7c1c to ec7558d41b34 (1 revision) (flutter/engine#54507)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#153313)

flutter/engine@bcf2dcc...5d8ee52

2024-08-12 [email protected] macOS: Fix crash in attributedSubstringForProposedRange with out of bounds range (flutter/engine#54469)
2024-08-12 [email protected] [Windows] Improve texture format logic (flutter/engine#54329)
2024-08-12 [email protected] Revert "[Impeller] remove scene3d support." (flutter/engine#54502)
2024-08-12 [email protected] Roll Skia from f77adcef7c1c to ec7558d41b34 (1 revision) (flutter/engine#54507)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: Crash in attributedSubstringForProposedRange

3 participants