mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	41078: Empty psvar could cause bad dereference in prompt expansion
This commit is contained in:
		
							parent
							
								
									51eff6168e
								
							
						
					
					
						commit
						263a0c2476
					
				
					 3 changed files with 10 additions and 1 deletions
				
			
		|  | @ -399,7 +399,7 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep) | |||
| 			test = 1; | ||||
| 		    break; | ||||
| 		case 'V': | ||||
| 		    if (arrlen_ge(psvar, arg)) { | ||||
| 		    if (psvar && *psvar && arrlen_ge(psvar, arg)) { | ||||
| 			if (*psvar[(arg ? arg : 1) - 1]) | ||||
| 			    test = 1; | ||||
| 		    } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue