* etags.c (Scheme_functions): Don't loop past a null character (Bug#5601).
authorChong Yidong <cyd@stupidchicken.com>
Sat, 20 Feb 2010 14:11:20 +0000 (09:11 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 20 Feb 2010 14:11:20 +0000 (09:11 -0500)
lib-src/ChangeLog
lib-src/etags.c

index 5a1b3ff..fd7097c 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-20  Kevin Ryde  <user42@zip.com.au>
+
+       * etags.c (Scheme_functions): Don't loop past a null character
+       (Bug#5601).
+
 2010-01-29  Kester Habermann  <kester@linuxtag.org>  (tiny change)
 
        * etags.c (Fortran_functions): Handle recursive keyword
index 2715df8..17aad9a 100644 (file)
@@ -5004,8 +5004,9 @@ Scheme_functions (inf)
       if (strneq (bp, "(def", 4) || strneq (bp, "(DEF", 4))
        {
          bp = skip_non_spaces (bp+4);
-         /* Skip over open parens and white space */
-         while (notinname (*bp))
+         /* Skip over open parens and white space.  Don't continue past
+            '\0'. */
+         while (*bp && notinname (*bp))
            bp++;
          get_tag (bp, NULL);
        }