util/token.h: fix possible out-of-bounds read

The 'WHITESPACE' case of the _calc_len method wrongly accessed the
character before checking upper bound of the token. The problem is fixed
by switching the order of both conditions.

Fixes #3756
This commit is contained in:
Norman Feske
2020-05-07 21:23:07 +02:00
parent 894c7411e7
commit 48b2456845
11 changed files with 122 additions and 4 deletions

View File

@@ -0,0 +1 @@
2020-04-23 42b5b14a84c37b36077cd9c304057c7e3d18163e