Prevent invalid columnPos() call in formUpdateBuffer()
Bug-Debian: https://github.com/tats/w3m/issues/89
This commit is contained in:
		
							
								
								
									
										2
									
								
								form.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								form.c
									
									
									
									
									
								
							| @@ -482,6 +482,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form) | |||||||
| 	rows = form->rows ? form->rows : 1; | 	rows = form->rows ? form->rows : 1; | ||||||
| 	col = COLPOS(l, a->start.pos); | 	col = COLPOS(l, a->start.pos); | ||||||
| 	for (c_rows = 0; c_rows < rows; c_rows++, l = l->next) { | 	for (c_rows = 0; c_rows < rows; c_rows++, l = l->next) { | ||||||
|  | 	    if (l == NULL) | ||||||
|  | 		break; | ||||||
| 	    if (rows > 1) { | 	    if (rows > 1) { | ||||||
| 		pos = columnPos(l, col); | 		pos = columnPos(l, col); | ||||||
| 		a = retrieveAnchor(buf->formitem, l->linenumber, pos); | 		a = retrieveAnchor(buf->formitem, l->linenumber, pos); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user