diff options
author | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-11 07:32:02 +0000 |
---|---|---|
committer | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-11 07:32:02 +0000 |
commit | e4d05c4f93d0cf4359a5df5862110d94c8216de4 (patch) | |
tree | b4524838f7fa31ca4c4f68f4a22597b194ebd9aa /Lib/csv.py | |
parent | Now that internal dialect type is immutable, and the dialect registry (diff) | |
download | cpython-e4d05c4f93d0cf4359a5df5862110d94c8216de4.tar.gz cpython-e4d05c4f93d0cf4359a5df5862110d94c8216de4.tar.bz2 cpython-e4d05c4f93d0cf4359a5df5862110d94c8216de4.zip |
Set an upper limit on the size of the field buffer, raise an exception
when this limit is reached. Limit defaults to 128k, and is changed
by module set_field_limit() method. Previously, an unmatched quote
character could result in the entire file being read into the field
buffer, potentially exhausting virtual memory.
Diffstat (limited to 'Lib/csv.py')
-rw-r--r-- | Lib/csv.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/csv.py b/Lib/csv.py index 37bdba524ad..aaaa3cfbbe3 100644 --- a/Lib/csv.py +++ b/Lib/csv.py @@ -6,6 +6,7 @@ csv.py - read/write/investigate CSV files import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ + set_field_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ __doc__ from _csv import Dialect as _Dialect |