From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: 13802@debbugs.gnu.org
Subject: bug#13802: stack overflow in mm-add-meta-html-tag
Date: Sun, 24 Feb 2013 10:17:53 +0100 [thread overview]
Message-ID: <87wqtyrry6.fsf@zigzag.favinet> (raw)
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
I see a "Stack overflow in regexp matcher" error traceable back to
lisp/gnus/mm-decode.el func ‘mm-add-meta-html-tag’ fragment:
(re-search-forward "\
<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']\
text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\(.+\\)\\)?[\"'][^>]*>" nil t)
To allow the user (not me) to continue, i kludged the form to be:
(ignore-errors
(re-search-forward "..." nil t))
that is, wrapping w/ ‘ignore-errors’. Is there a better solution?
One idea (untested) is to replace the ".+" (used to match the charset)
with a more specific pattern. Perhaps "[^<>]+" or "\\sw+"?
Thinking more systematically, maybe Emacs should add a condition
‘stack-overflow/regexp’ (or something like that) such that code can
‘condition-case’ for it and try a fallback path.
--
Thien-Thi Nguyen ..................................... GPG key: 4C807502
. NB: ttn at glug dot org is not me .
. (and has not been since 2007 or so) .
. ACCEPT NO SUBSTITUTES .
........... please send technical questions to mailing lists ...........
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2013-02-24 9:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-24 9:17 Thien-Thi Nguyen [this message]
2013-02-25 0:20 ` bug#13802: stack overflow in mm-add-meta-html-tag Juri Linkov
2014-01-31 0:38 ` Lars Ingebrigtsen
2014-01-31 6:10 ` Thien-Thi Nguyen
2016-03-01 5:58 ` Lars Ingebrigtsen
2013-02-25 2:04 ` Stefan Monnier
2013-07-06 16:11 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wqtyrry6.fsf@zigzag.favinet \
--to=ttn@gnuvola.org \
--cc=13802@debbugs.gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.