Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix std::out_of_range exception with short filenames (Linux) #119

Merged
merged 1 commit into from
Feb 7, 2015

Conversation

cwmiller
Copy link

@cwmiller cwmiller commented Feb 7, 2015

An unsigned integer was being used while scanning the CLR path to locate assemblies. If a file existed in the directory with a name shorter than the longest extension being checked for (.ni.dll), then the variable would underflow and cause an exception when used as an index on the filename.

$ touch 123456

$ ./corerun hello.exe
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::compare: __pos (which is 18446744073709551615) > this->size() (which is 6)
Aborted (core dumped)

An unsigned integer was being used while scanning the CLR path to locate assemblies. If a file existed in the directory with a name shorter than the longest extension being checked for (.ni.dll), then the variable would underflow and cause an exception when used as an index on the filename.
@janvorli
Copy link
Member

janvorli commented Feb 7, 2015

LGTM, thanks for fixing it.

@janvorli
Copy link
Member

janvorli commented Feb 7, 2015

@jkotas Could you please take a look and merge if you are ok?

@jkotas
Copy link
Member

jkotas commented Feb 7, 2015

LGTM

jkotas added a commit that referenced this pull request Feb 7, 2015
Fix std::out_of_range exception with short filenames (Linux)
@jkotas jkotas merged commit 59cebfb into dotnet:master Feb 7, 2015
franksinankaya added a commit to franksinankaya/coreclr that referenced this pull request Apr 3, 2020
franksinankaya added a commit to franksinankaya/coreclr that referenced this pull request Apr 3, 2020
movs r7, dotnet#119
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants