mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Lexer: ::isDOM failed to enforce minimum size before allowing no endBoundary
This commit is contained in:
parent
c2f08c8f05
commit
a5507678e8
1 changed files with 6 additions and 5 deletions
|
@ -520,6 +520,7 @@ bool Lexer::isUUID (std::string& token, Lexer::Type& type, bool endBoundary)
|
|||
{
|
||||
std::size_t marker = _cursor;
|
||||
|
||||
// Greedy.
|
||||
std::size_t i = 0;
|
||||
for (; i < 36 && marker + i < _eos; i++)
|
||||
{
|
||||
|
@ -532,11 +533,11 @@ bool Lexer::isUUID (std::string& token, Lexer::Type& type, bool endBoundary)
|
|||
break;
|
||||
}
|
||||
|
||||
if (! endBoundary ||
|
||||
(i >= uuid_min_length &&
|
||||
(_text[marker + i] == 0 ||
|
||||
isWhitespace (_text[marker + i]) ||
|
||||
isSingleCharOperator (_text[marker + i]))))
|
||||
if (i >= uuid_min_length &&
|
||||
(! endBoundary ||
|
||||
! _text[marker + i] ||
|
||||
isWhitespace (_text[marker + i]) ||
|
||||
isSingleCharOperator (_text[marker + i])))
|
||||
{
|
||||
token = _text.substr (_cursor, i);
|
||||
if (! isAllDigits (token))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue