Bug 83179

Summary: segmentation fault when resizing a kterm window on remote ia-32 host.
Product: Red Hat Enterprise Linux 2.1 Reporter: Fuchi Hideshi <hfuchi>
Component: ktermAssignee: Nakai <ynakai>
Status: CLOSED RAWHIDE QA Contact: Bill Huang <bhuang>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: rrosario
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-31 09:46:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fuchi Hideshi 2003-01-31 01:49:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021226 

Description of problem:
segmentation fault when resizing a kterm window on remote ia-32 host.
This bug is not in xterm. only kterm.

Version-Release number of selected component (if applicable):

How reproducible:
Always

Steps to Reproduce:

Please execute the following command on ia32 (any hardware, any OS).

ia32@user% xhost +
ia32@user% ssh user@ia64

loggin ia64 remote phost

ia64@user% export DISPLAY=ia32:0.0
ia64@user% kterm 

resize a kterm window, results in Segmentation fault.

Actual Results:  resize a kterm window, results in Segmentation fault.

Expected Results:  no segmentation fault.

Additional info:

solution:
We have to describe #include <stdlib.h>, when using an calloc().
It solves with the following simple 2 lines patch.

diff -urN kterm-6.2.0.org/screen.c kterm-6.2.0/screen.c
--- kterm-6.2.0.org/screen.c    Fri Jan 31 10:19:23 2003
+++ kterm-6.2.0/screen.c        Fri Jan 31 10:20:36 2003
@@ -34,6 +34,7 @@

 #include <stdio.h>
 #include <signal.h>
+#include <stdlib.h>
 #if defined(SVR4) || defined(hpux)
 #include <termios.h>
 #else
diff -urN kterm-6.2.0.org/scrollbar.c kterm-6.2.0/scrollbar.c
--- kterm-6.2.0.org/scrollbar.c Fri Jan 31 10:19:26 2003
+++ kterm-6.2.0/scrollbar.c     Fri Jan 31 10:20:44 2003
@@ -30,6 +30,7 @@

 #include <stdio.h>
 #include <ctype.h>
+#include <stdlib.h>
 #include <X11/Xatom.h>

 #include <X11/StringDefs.h>

Comment 1 Nakai 2003-01-31 09:46:59 UTC
Fixed in kterm-6.2.0-33