diff options
author | 2017-02-10 11:20:10 -0800 | |
---|---|---|
committer | 2017-02-10 11:28:46 -0800 | |
commit | 033f87b7f4d54c9f981ef848f559d232dbcc8d34 (patch) | |
tree | 9d6f91b59e048093c71220a11f81d6dd3579c479 /tensorflow/core/lib/strings/scanner.h | |
parent | 30ef1b01bb78e37f23b6d30b9b135fc14d5f3030 (diff) |
Fix transform graph parsing to avoid infinite loop
Solves problem in issue #7150
Change: 147177034
Diffstat (limited to 'tensorflow/core/lib/strings/scanner.h')
-rw-r--r-- | tensorflow/core/lib/strings/scanner.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/core/lib/strings/scanner.h b/tensorflow/core/lib/strings/scanner.h index 8bcf05104c..d3b63357ee 100644 --- a/tensorflow/core/lib/strings/scanner.h +++ b/tensorflow/core/lib/strings/scanner.h @@ -88,7 +88,9 @@ class Scanner { return *this; } - // Consume characters from the input as long as they match <clz>. + // Consume characters from the input as long as they match <clz>. Zero + // characters is still considered a match, so it will never cause GetResult to + // return false. Scanner& Any(CharClass clz) { while (!cur_.empty() && Matches(clz, cur_[0])) { cur_.remove_prefix(1); |