all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13802: stack overflow in mm-add-meta-html-tag
@ 2013-02-24  9:17 Thien-Thi Nguyen
  2013-02-25  0:20 ` Juri Linkov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2013-02-24  9:17 UTC (permalink / raw)
  To: 13802

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-01  5:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-24  9:17 bug#13802: stack overflow in mm-add-meta-html-tag Thien-Thi Nguyen
2013-02-25  0:20 ` 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

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.