mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Issue #16404: Add checks for return value of PyLong_FromLong() in
sys.getwindowsversion() and ossaudiodev.setparameters(). Reported by Ned Batchelder.
This commit is contained in:
		
							parent
							
								
									87a854dc73
								
							
						
					
					
						commit
						48d761e2b4
					
				
					 2 changed files with 5 additions and 8 deletions
				
			
		|  | @ -747,6 +747,10 @@ sys_getwindowsversion(PyObject *self) | |||
|     PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.wSuiteMask)); | ||||
|     PyStructSequence_SET_ITEM(version, pos++, PyLong_FromLong(ver.wProductType)); | ||||
| 
 | ||||
|     if (PyErr_Occurred()) { | ||||
|         Py_DECREF(version); | ||||
|         return NULL; | ||||
|     } | ||||
|     return version; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka