Skip to content

Commit

Permalink
Avoid infinite loop in getCoreDumpFile()
Browse files Browse the repository at this point in the history
(cherry picked from commit cf0be2d)
  • Loading branch information
AMDmi3 authored and dscharrer committed Apr 2, 2022
1 parent a34ba1a commit c33feb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/crashhandler/CrashHandlerPOSIX.cpp
Expand Up @@ -171,7 +171,7 @@ static fs::path getCoreDumpFile() {
size_t start = 0;
while(start < pattern.length()) {

size_t end = pattern.find('%');
size_t end = pattern.find('%', start);
if(end == std::string::npos) {
end = pattern.length();
}
Expand Down Expand Up @@ -246,7 +246,7 @@ static fs::path getCoreDumpFile() {
size_t start = 0;
while(start < pattern.length()) {

size_t end = pattern.find('%');
size_t end = pattern.find('%', start);
if(end == std::string::npos) {
end = pattern.length();
}
Expand Down

0 comments on commit c33feb2

Please sign in to comment.