Skip to content

Highlight v3.43/v3.44: CodeGenerator+ESC_TRUECOLOR may causes crash by out of memory #26

@smdn

Description

@smdn

Smdn.LibHighlightSharp.Bindings.CodeGenerator.generateString seems to return an un-null-terminated string, may causing a crash.

Unhandled exception. System.ArgumentException: The string must be null-terminated.
  at System.String.ThrowMustBeNullTerminatedString()
  at System.String.Ctor(SByte* value)
  at System.StubHelpers.CSTRMarshaler.ConvertToManaged(IntPtr cstr)

This does not occur 100% of the time and seems to depend on the process circumstances.
Confirmed that this occurs when OutputType is ESC_TRUECOLOR, but it is not tested that this occurs in other OutputTypes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    highlight-issueHighlight native implementation issueswontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions