Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception in rescle.cc:"CALLBACK ResourceUpdater::OnEnumResourceManifest" #82

Open
c1arocque opened this issue Jan 29, 2019 · 0 comments

Comments

@c1arocque
Copy link

Hi

The problem is observable when executing in debug. prior to application exit a "std::out_of_range" exception is thrown. The error source is in rescle.cc line 908. The behavior of "size_t start = manifestStringLocal.find(L"<?xml");" is poor at fault. Documentation for "std::string.find" states that if the search string is not found the return value is "basic_string::npos" == "-1". Unfortunately the return value of ::find" is type "unsigned int" and so the test "if (start < 0)" fails, passing an out of range start value to "manifestStringLocal = manifestStringLocal.substr(start);".

//if (start > 0) {
if ((start > 0) && (start < manifestStringLocal.size())) {

fixes the problem.

Regards

Chris LaRocque

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant