Preserve one byte for end of string character in form_update_line()
Bug-Debian: https://github.com/tats/w3m/issues/82 cf. https://github.com/tats/w3m/issues/68#issuecomment-266214643
This commit is contained in:
		
							
								
								
									
										2
									
								
								form.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								form.c
									
									
									
									
									
								
							| @@ -319,7 +319,7 @@ form_update_line(Line *line, char **str, int spos, int epos, int width, | |||||||
|     } |     } | ||||||
|     pos += width - w; |     pos += width - w; | ||||||
|  |  | ||||||
|     len = line->len + pos + spos - epos; |     len = line->len + pos + spos - epos + 1; | ||||||
|     buf = New_N(char, len); |     buf = New_N(char, len); | ||||||
|     prop = New_N(Lineprop, len); |     prop = New_N(Lineprop, len); | ||||||
|     bcopy((void *)line->lineBuf, (void *)buf, spos * sizeof(char)); |     bcopy((void *)line->lineBuf, (void *)buf, spos * sizeof(char)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user