This is an archive of the discontinued LLVM Phabricator instance.

[Bash-autocomplete] Fix crash when invoking --autocomplete without value.
ClosedPublic

Authored by teemperor on Sep 5 2017, 3:58 AM.

Details

Summary

Currently clang segfaults when invoked with clang --autocomplete=.
This patch adds the necessary boundary checks and some tests for corner cases like this.

Diff Detail

Repository
rL LLVM

Event Timeline

teemperor created this revision.Sep 5 2017, 3:58 AM
yamaguchi accepted this revision.Sep 5 2017, 5:06 AM

LGTM! Thanks for the fix!

This revision is now accepted and ready to land.Sep 5 2017, 5:06 AM
This revision was automatically updated to reflect the committed changes.