mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Add explicit check for correct next character in format at end of
format. This will complain about illegal formats like "O#" instead of ignoring the '#'.
This commit is contained in:
		
							parent
							
								
									eefcba61f4
								
							
						
					
					
						commit
						231a41e708
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -256,6 +256,13 @@ vgetargs1(args, format, p_va, compat) | |||
| 			return 0; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if (*format != '\0' && !isalpha(*format) && | ||||
| 	    *format != '|' && *format != ':' && *format != ';') { | ||||
| 		PyErr_Format(PyExc_SystemError, | ||||
| 			     "bad format string: %s", formatsave); | ||||
| 		return 0; | ||||
| 	} | ||||
| 	 | ||||
| 	return 1; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum