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.
std::string filename(entry->d_name);
// Check if the extension matches the one we are looking for
- size_t extPos = filename.length() - extLength;
+ int extPos = filename.length() - extLength;
if ((extPos <= 0) || (filename.compare(extPos, extLength, ext) != 0))
{
continue;