GNU bug report logs - #13802
stack overflow in mm-add-meta-html-tag

Previous Next

Packages: gnus, emacs;

Reported by: Thien-Thi Nguyen <ttn <at> gnuvola.org>

Date: Sun, 24 Feb 2013 09:18:02 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: Thien-Thi Nguyen <ttn <at> gnuvola.org>
Cc: 13802 <at> debbugs.gnu.org
Subject: bug#13802: stack overflow in mm-add-meta-html-tag
Date: Mon, 25 Feb 2013 02:20:39 +0200
> 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?

`sgml-html-meta-auto-coding-function' uses a similar regexp
that doesn't fail with stack overflow.  You could get some ideas
from this regexp and sync the regexp in `mm-add-meta-html-tag' with it.




This bug report was last modified 9 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.