diff -up grep-2.12/src/kwsearch.c.orig grep-2.12/src/kwsearch.c
--- grep-2.12/src/kwsearch.c.orig	2012-02-27 02:35:19.015204352 -0700
+++ grep-2.12/src/kwsearch.c	2012-05-02 22:46:36.262668288 -0600
@@ -106,8 +106,9 @@ Fexecute (char const *buf, size_t size, 
           /* The match was a part of multibyte character, advance at least
              one byte to ensure no infinite loop happens.  */
           mbstate_t s;
+          size_t mb_len;
           memset (&s, 0, sizeof s);
-          size_t mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s);
+          mb_len = mbrlen (mb_start, (buf + size) - (beg + offset), &s);
           if (mb_len == (size_t) -2)
             goto failure;
           beg = mb_start;
