[Python-checkins] CVS: python/dist/src/Modules binascii.c,2.27,2.27.2.1

Moshe Zadka moshez@users.sourceforge.net
2001年3月31日 03:14:45 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv28421/Modules
Modified Files:
 Tag: release20-maint
	binascii.c 
Log Message:
Address a bug in the uuencode decoder, reported bu "donut" in SF bug
#127718: '@' and '`' seem to be confused.
Index: binascii.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v
retrieving revision 2.27
retrieving revision 2.27.2.1
diff -C2 -r2.27 -r2.27.2.1
*** binascii.c	2000年09月01日 23:29:26	2.27
--- binascii.c	2001年03月31日 11:14:43	2.27.2.1
***************
*** 205,209 ****
 			** The 64 in stead of the expected 63 is because
 			** there are a few uuencodes out there that use
! 			** '@' as zero instead of space.
 			*/
 			if ( this_ch < ' ' || this_ch > (' ' + 64)) {
--- 205,209 ----
 			** The 64 in stead of the expected 63 is because
 			** there are a few uuencodes out there that use
! 			** '`' as zero instead of space.
 			*/
 			if ( this_ch < ' ' || this_ch > (' ' + 64)) {
***************
*** 233,238 ****
 	while( ascii_len-- > 0 ) {
 		this_ch = *ascii_data++;
! 		/* 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");
--- 233,238 ----
 	while( ascii_len-- > 0 ) {
 		this_ch = *ascii_data++;
! 		/* Extra '`' may be written as padding in some cases */
! 		if ( this_ch != ' ' && this_ch != ' '+64 &&
 		 this_ch != '\n' && this_ch != '\r' ) {
 			PyErr_SetString(Error, "Trailing garbage");

AltStyle によって変換されたページ (->オリジナル) /