mirror of
				https://github.com/arsenetar/dupeguru.git
				synced 2025-09-11 17:58:17 +00:00 
			
		
		
		
	Fixed nasty crash during PE's Cocoa block scanning
Using PyUnicode_GET_SIZE was obviously wrong, but I'm guessing that the str changes in py3.3 made that wrongness significant...
This commit is contained in:
		
							parent
							
								
									dcc57a7afb
								
							
						
					
					
						commit
						350b2c64e0
					
				| @ -32,7 +32,7 @@ pystring2cfstring(PyObject *pystring) | |||||||
|     } |     } | ||||||
|      |      | ||||||
|     s = (UInt8*)PyBytes_AS_STRING(encoded); |     s = (UInt8*)PyBytes_AS_STRING(encoded); | ||||||
|     size = PyUnicode_GET_SIZE(encoded); |     size = PyBytes_GET_SIZE(encoded); | ||||||
|     result = CFStringCreateWithBytes(NULL, s, size, kCFStringEncodingUTF8, FALSE); |     result = CFStringCreateWithBytes(NULL, s, size, kCFStringEncodingUTF8, FALSE); | ||||||
|     Py_DECREF(encoded); |     Py_DECREF(encoded); | ||||||
|     return result; |     return result; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user