Skip to content

Commit

Permalink
Check size before taking substr
Browse files Browse the repository at this point in the history
  • Loading branch information
MattClarkson committed Apr 19, 2014
1 parent b552a91 commit f81bbf9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ BundleLoader::ListLibraries(IBundle::Pointer bundle, std::vector<std::string>& l
}
else
{
if (iter->substr(iter->size() - suf) == Poco::SharedLibrary::suffix())
if (iter->size() > suf && iter->substr(iter->size() - suf) == Poco::SharedLibrary::suffix())
{
iter->erase(iter->size() - suf);
iter->insert(0, baseDir);
Expand Down

0 comments on commit f81bbf9

Please sign in to comment.