Go to file
Phil Turnbull 76f96c5979
Correctly cast `name_length`
`buffer[i++]` is a `signed char` so this cast does not correctly handle
negative values. If a custom tag has a length greater than 128 then
`buffer[i++]` is negative and so the `(uint16_t)` cast will cast it to a large
unsigned integer. This causes an out-of-bound read when reading the tag name.

We need to cast `name_length` to a `uint8_t` first, then widen to a `uint16_t`.
2019-02-26 12:05:01 -05:00
corpus Make distinct nodes for style/script, set up injection 2018-12-14 17:43:41 -08:00
examples Fix memory errors for deeply-nested HTML 2018-07-18 11:24:15 -07:00
properties Make distinct nodes for style/script, set up injection 2018-12-14 17:43:41 -08:00
src Correctly cast `name_length` 2019-02-26 12:05:01 -05:00
.gitattributes Count scanner but not parser in GH language stats 2018-06-13 09:34:38 -07:00
.gitignore Ignore package-lock.json 2018-06-12 10:52:43 -07:00
.npmignore Fix memory errors for deeply-nested HTML 2018-07-18 11:24:15 -07:00
.travis.yml Travis: Set CXX to clang++, not clang 2019-02-19 11:39:31 -08:00
LICENSE Initial commit 2018-06-11 16:59:22 -07:00
README.md Add README, CI config files 2018-06-11 17:22:50 -07:00
appveyor.yml Fix windows test script 2019-02-19 11:28:15 -08:00
binding.gyp Start tracking element nesting in external scanner 2018-06-11 16:59:44 -07:00
grammar.js Make distinct nodes for style/script, set up injection 2018-12-14 17:43:41 -08:00
index.js Initial commit 2018-06-11 16:59:22 -07:00
package.json Fix windows test script 2019-02-19 11:28:15 -08:00

README.md

tree-sitter-html

Build Status Build status

HTML grammar for tree-sitter.

References