Bug 74594 - transfig fails with segmentation fault on ANY file
transfig fails with segmentation fault on ANY file
Product: Red Hat Linux
Classification: Retired
Component: transfig (Show other bugs)
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Ngo Than
Depends On:
  Show dependency treegraph
Reported: 2002-09-27 04:36 EDT by Sysoltsev Slawa
Modified: 2012-05-31 14:33 EDT (History)
0 users

See Also:
Fixed In Version: 3.2.4-8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-19 03:38:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Sysoltsev Slawa 2002-09-27 04:36:27 EDT
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:

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 04:43:09 EDT
Created attachment 77446 [details]
patch adds #include <stdlib> to transfig.c and sys.c files
Comment 2 Miloslav Trmač 2004-10-19 03:38:51 EDT
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.