After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726468 - Crash with mails with large HTML tags
Crash with mails with large HTML tags
Product: geary
Classification: Other
Component: engine
Other Linux
: Normal normal
: 0.6.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Reported: 2014-03-16 17:34 UTC by Simon Lipp
Modified: 2014-03-17 19:41 UTC
See Also:
GNOME target: ---
GNOME version: ---

Mail triggering this bug (299.68 KB, text/plain)
2014-03-16 17:34 UTC, Simon Lipp
Patch (704 bytes, patch)
2014-03-16 17:35 UTC, Simon Lipp
none Details | Review

Description Simon Lipp 2014-03-16 17:34:25 UTC
Created attachment 272079 [details]
Mail triggering this bug

When geary try to contruct a preview of a mail containing a very large HTML tags (like the one attached), the execution of the regular expression used to remove tags induce a stack overflow, since each character consumed by the (.|\n) expression produce a new state on the stack for the backtracking algorithm.

Attached patch fixes the issue.
Comment 1 Simon Lipp 2014-03-16 17:35:14 UTC
Created attachment 272080 [details] [review]
Comment 2 Jim Nelson 2014-03-17 18:07:37 UTC
Thanks!  We'll take a look.  We're on the cusp of a stable release, so it's possible we won't take your patch for this version.
Comment 3 Charles Lindsay 2014-03-17 19:41:37 UTC
Thanks, Simon, this looks good.  I also edited the comment above that line appropriately.

Fixed in commit 6e6df92.