about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/utils.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ec4db538..f293c01ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-27  Peter Stephenson  <pws@csr.com>
+
+	* 22522: Src/utils.c: infinite loop with invalid character
+	in mb_metastrlen().
+
 2006-06-26  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 22519: Test/D07multibyte.ztst: initial multibyte parameter tests.
diff --git a/Src/utils.c b/Src/utils.c
index 583945ac5..4b2f07f19 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3778,8 +3778,8 @@ mb_metastrlen(char *ptr)
 		/* Reset, treat as single character */
 		memset(&mb_shiftstate, 0, sizeof(mb_shiftstate));
 		ptr = laststart + (*laststart == Meta) + 1;
-	    } else
-		laststart = ptr;
+	    }
+	    laststart = ptr;
 	    num++;
 	    num_in_char = 0;
 	}