From: Chong Yidong Date: Sat, 20 Feb 2010 14:11:20 +0000 (-0500) Subject: * etags.c (Scheme_functions): Don't loop past a null character (Bug#5601). X-Git-Tag: emacs-pretest-23.1.93~24 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9b84f9f4baeb658b57a0a92c3dee9df5b4ab028;p=emacs.git * etags.c (Scheme_functions): Don't loop past a null character (Bug#5601). --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 5a1b3ff7d5a..fd7097c0956 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2010-02-20 Kevin Ryde + + * etags.c (Scheme_functions): Don't loop past a null character + (Bug#5601). + 2010-01-29 Kester Habermann (tiny change) * etags.c (Fortran_functions): Handle recursive keyword diff --git a/lib-src/etags.c b/lib-src/etags.c index 2715df8b5cc..17aad9a2252 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -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); }