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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy