Bug 42556 - xfig coredumps if .xfigrc contains newline in filenames
xfig coredumps if .xfigrc contains newline in filenames
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: xfig (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-28 05:58 EDT by santini
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-28 05:58:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description santini 2001-05-28 05:58:52 EDT
Description of problem:
My xfig crashed at startup. A strace reveals that it happend while 
reading .xfigrc. Deleting it makes xfig run with no problem.

My .xifgrc contained:

file: /home/santini/
test

(yes, a newline in the middle of the filename). With such a .xfigrc (or
similar, with a newline in a filename) causes xfig to coredump. These are
the last straced lines:

open("/home/santini/.xfigrc", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0640, st_size=23, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40018000
read(4, "file: /home/user/\ntest\n", 4096) = 23
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++


How reproducible:
Always

Steps to Reproduce:
1. Put 

file: something
andnewline

in .xfigrc

2. launch xfig
	

Actual Results:  The program core dupms instead of running.

Expected Results:  Just run...

Additional info:

Removing the .xfigrc (or simply removing filenames with newline in them)
solves the problem.

These are the last straced line of a crash:

open("/home/santini/.xfigrc", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0640, st_size=16, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40018000
read(4, "file: something\nandnewline\n", 4096)     = 16
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
Comment 1 Ngo Than 2001-05-29 12:33:36 EDT
It's fixed in xfig-3.2.3d-0.1.You will find it later in rawhide.

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