diff options
author | George Rimar <grimar@accesssoftek.com> | 2019-10-21 10:38:03 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2019-10-21 10:38:03 +0000 |
commit | 4ec0b084389619442638d7d3563793f21d787501 (patch) | |
tree | 5d76c986605c5bca6298106e4d14d48677caeb74 /lldb/packages/Python/lldbsuite/test/python_api | |
parent | d6e6aa8a42a96c09a78f0e02ecf50f12deda8024 (diff) | |
download | bcm5719-llvm-4ec0b084389619442638d7d3563793f21d787501.tar.gz bcm5719-llvm-4ec0b084389619442638d7d3563793f21d787501.zip |
[obj2yaml] - Stop triggering UB when dumping corrupted strings.
We have a following code to find quote type:
if (isspace(S.front()) || isspace(S.back()))
...
Problem is that:
"int isspace( int ch ): The behavior is undefined if the value of
ch is not representable as unsigned char and is not equal to EOF."
(https://en.cppreference.com/w/cpp/string/byte/isspace)
This patch shows how this UB can be triggered and fixes an issue.
Differential revision: https://reviews.llvm.org/D69160
llvm-svn: 375404
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions