Permalink
Browse files

RFC109: fix inifinite loop on metadata substitutions (#4877)

  • Loading branch information...
tbonfort committed Mar 10, 2014
1 parent f1b98e9 commit 99db0ee47fc69d75d5548e059bf19904de7b9e36
Showing with 3 additions and 2 deletions.
  1. +3 −2 mapfile.c
View
@@ -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);
}
}

0 comments on commit 99db0ee

Please sign in to comment.