Skip to content
Commit 2d425798 authored by Raphael Isemann's avatar Raphael Isemann
Browse files

Fix some crashes and deadlocks in FormatAnsiTerminalCodes

Summary:
This patch fixes a few problems with the FormatAnsiTerminalCodes function:

* It does an infinite loop on an unknown color value.
* It crashes when the color value is at the end of the string.
* It deletes the first character behind the color token.

Also added a few tests that reproduce those problems (and test some other corner cases).

Reviewers: davide, labath

Reviewed By: labath

Subscribers: labath, lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D49307

llvm-svn: 337189
parent 94d84088
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment