mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
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.
This commit is contained in:
parent
29bf4e44f6
commit
e4d05c4f93
3 changed files with 87 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue