unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Masatake YAMATO <jet@gyve.org>
Subject: Fix infinite loop in tex file handling in etags
Date: Mon, 07 Aug 2006 13:01:10 +0900 (JST)	[thread overview]
Message-ID: <20060807.130110.80242582.jet@gyve.org> (raw)

Could someone install this patch, too?

2006-08-07  Masatake YAMATO  <jet@gyve.org>

	* etags.c (TEX_mode): Check getc retruns EOF.
	File ended without newline causes infinite loop.

--- orig/lib-src/etags.c
+++ mod/lib-src/etags.c
@@ -5198,7 +5198,7 @@
     {
       /* Skip to next line if we hit the TeX comment char. */
       if (c == '%')
-	while (c != '\n')
+	while (c != '\n' && c != EOF)
 	  c = getc (inf);
       else if (c == TEX_LESC || c == TEX_SESC )
 	break;

             reply	other threads:[~2006-08-07  4:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07  4:01 Masatake YAMATO [this message]
2006-08-08  9:33 ` Fix infinite loop in tex file handling in etags Jan Djärv
2006-08-12 13:46   ` Francesco Potorti
2006-08-12 14:24     ` Jan D.
2006-08-14  8:35     ` Masatake YAMATO
2006-08-14 14:29       ` Francesco Potorti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060807.130110.80242582.jet@gyve.org \
    --to=jet@gyve.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).