Skip to content

Potential out-of-range or memory access error in UEncodings unit #97

Closed
@delphidabbler

Description

@delphidabbler

In WideCharToChar in UEncodings the 1st call to WideCharToMultiByte passes reference to Dest array, before that array's size has been set. Instead of passing Dest, nil should be passed here.

Instead of

  BufSize := WideCharToMultiByte(
    CodePage, 0, @Source, 1, @Dest[0], 0, nil, nil
  );

uses

  BufSize := WideCharToMultiByte(
    CodePage, 0, @Source, 1, nil, 0, nil, nil
  );

Metadata

Metadata

Assignees

Labels

bugBug reportcompletedWork has been completed on this issue and changes have been committed to `develop` branch..

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions