[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: easyedit



I see this was reported before, but nobody actually fixed it then.
Sorry.

> From: "Szabo, Tamas" <Tamas.Szabo@xxxxxxx.com>
> Date: Wed, 9 Jan 2002 15:14:20 -0000 

> When  I try to execute easyedit on devboard I always get 'Segmentation
> fault'. I use devboard_lx 2.1.0 and kernel 2.4.10. Did anybody meet this
> problem?

The program easyedit has a bug causing the heap (malloc's internal
structure) to be overwritten, and the call to free on line 1488 in
CAP_PARSE in apps/editors/easyedit/new_curse.c gets a SEGV, given
TERM=xterm.  The actual bug is in Find_term.  This patch fixes it.


*** new_curse.c~	Mon Jan 17 16:00:27 2000
--- new_curse.c	Tue Jan 15 04:24:24 2002
*************** Find_term()		/* find terminal descriptio
*** 1360,1366 ****
  	char *Name;
  	char *Ftemp;
  
! 	Ftemp = Name = malloc(strlen(TERMINAL_TYPE + 1) + 1);
  	strcpy(Name, TERMINAL_TYPE);
  	while (*Ftemp != (char)NULL)
  		Ftemp++;
--- 1360,1366 ----
  	char *Name;
  	char *Ftemp;
  
! 	Ftemp = Name = malloc(strlen(TERMINAL_TYPE) + 1 + 1);
  	strcpy(Name, TERMINAL_TYPE);
  	while (*Ftemp != (char)NULL)
  		Ftemp++;


brgds, H-P