Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential null pointer dereference in FlutterDartProject #6035

Merged
merged 1 commit into from
Aug 17, 2018
Merged

Fix potential null pointer dereference in FlutterDartProject #6035

merged 1 commit into from
Aug 17, 2018

Conversation

jamesderlin
Copy link
Contributor

If FlutterDartProject found an FLTLibraryPath entry in an iOS
application's Info.plist, it assumed that values that were valid
filesystem paths were paths to bundles. After the attempt to
retrieve the NSBundle fails, FlutterDartProject then assigns
nil to a C++ std::string, resulting in a null pointer
dereference.

Add some failure checks to prevent this.

If `FlutterDartProject` found an `FLTLibraryPath` entry in an iOS
application's `Info.plist`, it assumed that values that were valid
filesystem paths were paths to bundles.  If the attempt to retrieve
the `NSBundle` fails, `FlutterDartProject` ignored the failure and
then would assign `nil` to a C++ `std::string`, resulting in a null
pointer dereference.

Add some failure checks to prevent this.
Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

Good catch.

@jamesderlin jamesderlin merged commit 4ff4a5c into flutter:master Aug 17, 2018
@jamesderlin jamesderlin deleted the jamesderlin/null-checks branch August 17, 2018 00:40
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2018
flutter/engine@4ee6489...4ff4a5c

git log 4ee6489..4ff4a5c --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2018
flutter/engine@4ee6489...6381bea

git log 4ee6489..6381bea --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2018
flutter/engine@4ee6489...6b94957

git log 4ee6489..6b94957 --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2018
flutter/engine@4ee6489...93efa7e

git log 4ee6489..93efa7e --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2018
flutter/engine@4ee6489...a7e0e87

git log 4ee6489..a7e0e87 --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2018
flutter/engine@4ee6489...5bd9620

git log 4ee6489..5bd9620 --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 18, 2018
flutter/engine@4ee6489...be0c314

git log 4ee6489..be0c314 --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 18, 2018
flutter/engine@4ee6489...f53e903

git log 4ee6489..f53e903 --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia ff6a73cc08af..c24e0c1e41ab (2 commits) (flutter/engine#6044)
2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 18, 2018
flutter/engine@4ee6489...b73ed06

git log 4ee6489..b73ed06 --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-18 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c24e0c1e41ab..5cc10c8cd6db (3 commits) (flutter/engine#6045)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia ff6a73cc08af..c24e0c1e41ab (2 commits) (flutter/engine#6044)
2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 19, 2018
flutter/engine@4ee6489...03f8ba5

git log 4ee6489..03f8ba5 --date=short --no-merges --format='%%ad %%ae %%s'
2018-08-19 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 5cc10c8cd6db..ae7229480cbe (1 commits) (flutter/engine#6046)
2018-08-18 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c24e0c1e41ab..5cc10c8cd6db (3 commits) (flutter/engine#6045)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia ff6a73cc08af..c24e0c1e41ab (2 commits) (flutter/engine#6044)
2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039)
2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037)
2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034)
2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033)

The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
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.

3 participants