mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	gh-96678: Fix UB of null pointer arithmetic (GH-96782)
Automerge-Triggered-By: GH:pablogsal
This commit is contained in:
		
							parent
							
								
									6ba686d97f
								
							
						
					
					
						commit
						81e36f350b
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		|  | @ -1533,7 +1533,7 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end) | |||
|     } while (c == ' ' || c == '\t' || c == '\014'); | ||||
| 
 | ||||
|     /* Set start of current token */ | ||||
|     tok->start = tok->cur - 1; | ||||
|     tok->start = tok->cur == NULL ? NULL : tok->cur - 1; | ||||
| 
 | ||||
|     /* Skip comment, unless it's a type comment */ | ||||
|     if (c == '#') { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Matthias Görgens
						Matthias Görgens