diff options
author | Guido van Rossum <guido@python.org> | 1997-07-11 18:36:28 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-07-11 18:36:28 (GMT) |
commit | 1243ae7f0767b5636ad1d071d15778f134f7c65f (patch) | |
tree | a7de7435850e727710b5676537b6abb11b11ad03 /Modules | |
parent | e3cd151d1f9b280217247d6e4f28932b96dc5322 (diff) | |
download | cpython-1243ae7f0767b5636ad1d071d15778f134f7c65f.zip cpython-1243ae7f0767b5636ad1d071d15778f134f7c65f.tar.gz cpython-1243ae7f0767b5636ad1d071d15778f134f7c65f.tar.bz2 |
Allow '@' character as end of line padding in uuencode format.
Not sure why this is generated, but this fixes a problem with a
particular file that was received with the following final line:
F-WE<-*A5]AY]%7>8'&!!(_Y<F*55_"*%46"<OFG=>_5(F/\'``!@
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/binascii.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c index 4776170..7e03799 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -265,7 +265,9 @@ binascii_a2b_uu(self, args) */ while( ascii_len-- > 0 ) { this_ch = *ascii_data++; - if ( this_ch != ' ' && this_ch != '\n' && this_ch != '\r' ) { + /* Extra '@' may be written as padding in some cases */ + if ( this_ch != ' ' && this_ch != '@' && + this_ch != '\n' && this_ch != '\r' ) { PyErr_SetString(Error, "Trailing garbage"); Py_DECREF(rv); return NULL; |