|
Ran
|
Files
163
|
Run time
8s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/universal-ctags/ctags/commit/<a class=hub.com/universal-ctags/ctags/commit/b2e27320f4f9e19e9ba410b2d7b75042f751aac1">b2e27320f<a href="https://github.com/universal-ctags/ctags/commit/b2e27320f4f9e19e9ba410b2d7b75042f751aac1">">tex: Fix infinite loop parsing an identifier at EOF This was introduced in </a><a class="double-link" href="https://github.com/universal-ctags/ctags/commit/<a class="double-link" href="https://github.com/universal-ctags/ctags/commit/5d5afe64ca5517c50897164f72db174428961e9f">5d5afe64c</a>">5d5afe64c</a><a href="https://github.com/universal-ctags/ctags/commit/b2e27320f4f9e19e9ba410b2d7b75042f751aac1"> which started accepting as an identifier character any byte with a value that cast as `unsigned char` is greater than or equal to 0x80. The common value for the `EOF` constant being -1, which cast to `unsigned char` gives a value of 0xff, hence leading to accepting `EOF` as an identifier character and then an infinite loop. Fix it on both sides: * Don't perform the cast, as it's unneeded in this case: `c` is an `int` holding the value of an `unsigned char` or `EOF` already, so anything equal to or above 0 is a legitimate input character. * Guard against `EOF` explicitly in the loop. Fixes #1896.
28440 of 33503 relevant lines covered (84.89%)
17559.9 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|