Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Fix segmentations failure in error.c gumbo_caret_diagnostic_to_string #371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 15, 2016

  1. Fix segmentations failure in error.c gumbo_caret_diagnostic_to_string

    Without this patch method find_last_newline returns value bigger than
    find_next_newline and in line `original_line.length = line_end -
    line_start;`
    overflow happens.
    
    Before changes newly added test failed with segmentation failure:
    ```
    ./test-driver: line 107: 12171 Segmentation fault      (core dumped)
    "$@" > $log_file 2>&1
    ```
    
    This slightly changed copy of code used in nokogumbo gem.
    [Link](https://github.com/rubys/nokogumbo/blob/8b4446847dea5c614759684ebcae4c580c47f4ad/ext/nokogumboc/nokogumbo.c#L230)
    DmitryBochkarev committed Dec 15, 2016
    Configuration menu
    Copy the full SHA
    ef94f4b View commit details
    Browse the repository at this point in the history