mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Fix crash due to uninitialized lastwp member of layout_cell, reported by
Balazs Kezes.
This commit is contained in:
		
							
								
								
									
										1
									
								
								layout.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								layout.c
									
									
									
									
									
								
							@@ -53,6 +53,7 @@ layout_create_cell(struct layout_cell *lcparent)
 | 
				
			|||||||
	lc->yoff = UINT_MAX;
 | 
						lc->yoff = UINT_MAX;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	lc->wp = NULL;
 | 
						lc->wp = NULL;
 | 
				
			||||||
 | 
						lc->lastwp = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return (lc);
 | 
						return (lc);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								window.c
									
									
									
									
									
								
							@@ -410,8 +410,9 @@ window_pane_active_set(struct window_pane *wp, struct window_pane *nextwp)
 | 
				
			|||||||
	 * Previously active pane, if any, must not be the same as the source
 | 
						 * Previously active pane, if any, must not be the same as the source
 | 
				
			||||||
	 * pane.
 | 
						 * pane.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (nextwp->layout_cell->parent != NULL) {
 | 
						lc = nextwp->layout_cell->parent;
 | 
				
			||||||
		lastwp = nextwp->layout_cell->parent->lastwp;
 | 
						if (lc != NULL && lc->lastwp != NULL) {
 | 
				
			||||||
 | 
							lastwp = lc->lastwp;
 | 
				
			||||||
		if (lastwp != wp && window_pane_visible(lastwp))
 | 
							if (lastwp != wp && window_pane_visible(lastwp))
 | 
				
			||||||
			return (lastwp);
 | 
								return (lastwp);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user