Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/coreclr/tools/superpmi/superpmi/jithost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@ bool JitHost::convertStringValueToInt(const char* key, const char* stringValue,
return false;
}

char* endPtr;
char* endPtr;
errno = 0;
unsigned long longResult = strtoul(stringValue, &endPtr, 16);
Comment thread
jakobbotsch marked this conversation as resolved.
bool succeeded = (errno != ERANGE) && (endPtr != stringValue) && (longResult <= INT_MAX);
bool succeeded = (errno != ERANGE) && (endPtr != stringValue) && (longResult <= UINT_MAX);
if (!succeeded)
{
LogWarning("Can't convert int config value from string, key: %ws, string value: %ws\n", key, stringValue);
LogWarning("Can't convert int config value from string, key: %s, string value: %s\n", key, stringValue);
Comment thread
jakobbotsch marked this conversation as resolved.
return false;
}

Expand Down
Loading