mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Two more cases of switch(PySequence_Size()) without checking for case -1.
(Same problem as last checkin for SF bug 610610) Need to clear the error and proceed. Backport candidate
This commit is contained in:
		
							parent
							
								
									40363b63f0
								
							
						
					
					
						commit
						2c96ab2b61
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -419,6 +419,9 @@ SystemExit__init__(PyObject *self, PyObject *args) | ||||||
|     case 1: |     case 1: | ||||||
|         code = PySequence_GetItem(args, 0); |         code = PySequence_GetItem(args, 0); | ||||||
|         break; |         break; | ||||||
|  |     case -1: | ||||||
|  |         PyErr_Clear(); | ||||||
|  |         /* Fall through */ | ||||||
|     default: |     default: | ||||||
|         Py_INCREF(args); |         Py_INCREF(args); | ||||||
|         code = args; |         code = args; | ||||||
|  | @ -522,6 +525,10 @@ EnvironmentError__init__(PyObject *self, PyObject *args) | ||||||
| 	    goto finally; | 	    goto finally; | ||||||
| 	} | 	} | ||||||
| 	break; | 	break; | ||||||
|  | 
 | ||||||
|  |     case -1: | ||||||
|  | 	PyErr_Clear(); | ||||||
|  | 	break; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     Py_INCREF(Py_None); |     Py_INCREF(Py_None); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neal Norwitz
						Neal Norwitz