This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: email: huge address lines blow stack
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, mhammond
Priority: normal Keywords:

Created on 2002-12-16 04:59 by mhammond, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
crash_email.patch mhammond, 2002-12-16 05:01 Possible patch
Messages (2)
msg13617 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2002-12-16 04:59
The following code will recurse until Python throws an
exception:
"""
import email.Utils
addrlist = ["foo@bar.com"] * 2000
email.Utils.getaddresses(addrlist)
"""

I found a huge address list in my spam archive, which
is how I found the error.  Attaching suggested patch
that avoids recursion.

bugfix candidate I guess?
msg13618 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-12-30 17:29
Logged In: YES 
user_id=12800

Funny, I just copied the implementation of this up from
rfc822.py into _parseaddr.py and it has something very
similar to what you done.  It uses += instead of .extend()
but I think that makes no difference.
History
Date User Action Args
2022-04-10 16:06:02adminsetgithub: 37614
2002-12-16 04:59:03mhammondcreate