Commits

hoffman  committed 4321618

BUG: fix for bug 0005767 hang for replace string with empty

  • Participants
  • Parent commits f940836
  • Tags PreDocChange

Comments (0)

Files changed (1)

File GCC_XML/KWSys/SystemTools.cxx

 
   // perform replacements until done
   size_t replaceSize = strlen(replace);
+  // do while hangs if replaceSize is 0
+  if(replaceSize == 0)
+    {
+    return;
+    }
   char *orig = strdup(src);
   char *currentPos = orig;
   searchPos = searchPos - src + orig;