mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Bug #4495: Fix signed/unsigned warning (both namelen and tailen should be signed, not just namelen).
This commit is contained in:
		
							parent
							
								
									5b78dd9fad
								
							
						
					
					
						commit
						048690410f
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -171,7 +171,7 @@ _Py_FindSourceFile(const char* filename, char* namebuf, size_t namelen, int open | ||||||
| 		if (!PyUnicode_Check(v)) | 		if (!PyUnicode_Check(v)) | ||||||
| 			continue; | 			continue; | ||||||
| 		path = _PyUnicode_AsStringAndSize(v, &len); | 		path = _PyUnicode_AsStringAndSize(v, &len); | ||||||
| 		if (len + 1 + taillen >= (Py_ssize_t)namelen - 1) | 		if (len + 1 + (Py_ssize_t)taillen >= (Py_ssize_t)namelen - 1) | ||||||
| 			continue; /* Too long */ | 			continue; /* Too long */ | ||||||
| 		strcpy(namebuf, path); | 		strcpy(namebuf, path); | ||||||
| 		if (strlen(namebuf) != len) | 		if (strlen(namebuf) != len) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger