Skip to content

Commit

Permalink
RFC109: fix inifinite loop on metadata substitutions (#4877)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Mar 10, 2014
1 parent f1b98e9 commit 99db0ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -6658,8 +6658,9 @@ static void hashTableSubstituteString(hashTableObj *hash, const char *from, cons
key = msFirstKeyFromHashTable(hash);
while(key != NULL) {
val = msLookupHashTable(hash, key);
if(!strcasestr(val, from)) continue;
msInsertHashTable(hash, key, msCaseReplaceSubstring(msStrdup(val), from, to));
if(strcasestr(val, from)) {
msInsertHashTable(hash, key, msCaseReplaceSubstring(msStrdup(val), from, to));
}
key = msNextKeyFromHashTable(hash, key);
}
}
Expand Down

0 comments on commit 99db0ee

Please sign in to comment.