mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
This commit is contained in:
		
						commit
						e58785b200
					
				
					 3 changed files with 50 additions and 0 deletions
				
			
		|  | @ -480,6 +480,10 @@ PyObject *PyBytes_DecodeEscape(const char *s, | |||
|                              errors); | ||||
|                 goto failed; | ||||
|             } | ||||
|             /* skip \x */ | ||||
|             if (s < end && Py_ISXDIGIT(s[0])) | ||||
|                 s++; /* and a hexdigit */ | ||||
|             break; | ||||
|         default: | ||||
|             *p++ = '\\'; | ||||
|             s--; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka