Bug 74594 - transfig fails with segmentation fault on ANY file
Summary: transfig fails with segmentation fault on ANY file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: transfig
Version: 7.2
Hardware: ia64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Than Ngo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-27 08:36 UTC by Sysoltsev Slawa
Modified: 2012-05-31 18:33 UTC (History)
0 users

Fixed In Version: 3.2.4-8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-19 07:38:51 UTC
Embargoed:


Attachments (Terms of Use)
patch adds #include <stdlib> to transfig.c and sys.c files (425 bytes, patch)
2002-09-27 08:43 UTC, Sysoltsev Slawa
no flags Details | Diff

Description Sysoltsev Slawa 2002-09-27 08:36:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
When I am trying to start transfig it fails with segmentation fault on any 
input file in parse_arg function (at line transfig.c:215).

Reason of fault is because you use malloc function implicitly without 
prototyping - gcc warns building package about it. Used implicitly, 'int' 
return type is assumed. As you may be know on IA64 'int' type is only 32bit 
width while pointers are 64bit width, so result from malloc is cutted to fit 32 
bit. As a result bad pointer is used and application crashes. Also such error
appears in sys.c (function mksuff).

Workaround is to add #include <stdlib> in begin transfig.c and sys.c source 
files. I'll attach patch fixing problem.
With it application becomes runnable.

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


How reproducible:
Always

Steps to Reproduce:
1. /usr/X11R6/bin/transfig SomeFile
	

Actual Results:  Message:
Segmentation fault (core dumped)

Expected Results:  Something more reliable

Additional info:

Comment 1 Sysoltsev Slawa 2002-09-27 08:43:09 UTC
Created attachment 77446 [details]
patch adds #include <stdlib> to transfig.c and sys.c files

Comment 2 Miloslav Trmač 2004-10-19 07:38:51 UTC
Fixed in transfig-3.2.4-8. Thanks for the patch.


Note You need to log in before you can comment on or make changes to this bug.