Skip to content

FORCEPATH's second parameter Limit #5

Closed

Description

@kirides

FORCEPATH(cFileName, cPath)

cPath is limited to MAX_PATH (260) characters. More than that leads to a C0000005 / Access Violation

cFileName does not have this limitation, it gets truncated if it's longer than MAX_PATH

* Path segment with 256 characters
FORCEPATH(REPLICATE("A",258), "C:\"+REPLICATE("A",256))
    && Application crashes with C0000005 / Access Violation

* Path segment with 255 Characters ending in a backslash
FORCEPATH(REPLICATE("A",258), "C:\"+REPLICATE("A",255)+"\")
    && No crash

* Path segment with 255 Characters ending in a backslash
* with any amount of additional characters after it
FORCEPATH(REPLICATE("A",258), "C:\"+REPLICATE("A",255)+"\a")
    && Application crashes with C0000005 / Access Violation

Activity

  1. self-assigned this
    on Feb 28, 2020
  2. added a commit that references this issue on Jun 24, 2022
    1446811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions