mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	SF #1701207, Fix bogus assertion (and test it!)
This commit is contained in:
		
							parent
							
								
									cbd9ee69ee
								
							
						
					
					
						commit
						68cdf8a6da
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -997,8 +997,6 @@ svnversion_init(void)
 | 
			
		|||
	}
 | 
			
		||||
	else if (istag || strncmp(br_start, "branches", 8) == 0) {
 | 
			
		||||
		len = br_end2 - br_start;
 | 
			
		||||
		assert(len >= 13);
 | 
			
		||||
		assert(len < (sizeof(patchlevel_revision) - 13));
 | 
			
		||||
		strncpy(branch, br_start, len);
 | 
			
		||||
		branch[len] = '\0';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1017,6 +1015,8 @@ svnversion_init(void)
 | 
			
		|||
		svn_revision = svnversion;
 | 
			
		||||
	else if (istag) {
 | 
			
		||||
		len = strlen(_patchlevel_revision);
 | 
			
		||||
		assert(len >= 13);
 | 
			
		||||
		assert(len < (sizeof(patchlevel_revision) + 13));
 | 
			
		||||
		strncpy(patchlevel_revision, _patchlevel_revision + 11,
 | 
			
		||||
			len - 13);
 | 
			
		||||
		patchlevel_revision[len - 13] = '\0';
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue