Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Three actual/potential memory errors #73

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Dec 19, 2020

  1. Write entire highlight string for a single-line comment

    Was writing `size` chars but the `hl` array was allocated as `rsize` chars.
    dirkf authored Dec 19, 2020
    Configuration menu
    Copy the full SHA
    0fcfb3c View commit details
    Browse the repository at this point in the history
  2. Avoid stepping past line end in an incomplete string when \ is last char

    With `'\` or `"...\` as the last characters on the line, `HL_STRING` could be written beyond the allocated size of the `hl` array, causing heap corruption and SEGV.
    dirkf authored Dec 19, 2020
    Configuration menu
    Copy the full SHA
    28bf46d View commit details
    Browse the repository at this point in the history
  3. Avoid invalid memory access if rest of line is shorter than some keyword

    The test for a keyword would try to read the entire length of each keyword from the line position even if the rest of the line was too short to contain that keyword. A PR was already submitted for this but the author closed it before it could be merged.
    dirkf authored Dec 19, 2020
    Configuration menu
    Copy the full SHA
    531b6fd View commit details
    Browse the repository at this point in the history