summaryrefslogtreecommitdiff
path: root/src/array_view.hh
diff options
context:
space:
mode:
authorChris Webb <chris@arachsys.com>2023-08-15 16:22:39 +0100
committerChris Webb <chris@arachsys.com>2023-08-15 16:22:39 +0100
commit491d4d47aefb28e92b9e0ab1459751aba083b834 (patch)
treeb89e9f7991a23cdd9be7767285f49e457b64213a /src/array_view.hh
parent6942a4c0c9428a9e2ddb65de3969d2dcb5c5eb2f (diff)
Fix segfault when adding an invalid default-region highlighter
RegionsHighlighter::create_region() validates the highlighter type argument but RegionsHighlighter::create_default_region() assumes it is correct, segfaulting from dereferencing a null pointer if the given type isn't in the highlighter registry HashMap. @PJungkamp reported this in https://github.com/mawww/kakoune/issues/4959 with a simple recipe to reproduce: :add-highlighter shared/test regions :add-highlighter shared/test/ default-region invalid highlighter :add-highlighter window/test ref test Validate the type argument in RegionsHighlighter::create_default_region() in the same way as RegionsHighlighter::create_region().
Diffstat (limited to 'src/array_view.hh')
0 files changed, 0 insertions, 0 deletions