Bug 42556 - xfig coredumps if .xfigrc contains newline in filenames
Summary: xfig coredumps if .xfigrc contains newline in filenames
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xfig   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-28 09:58 UTC by santini
Modified: 2008-05-01 15:38 UTC (History)
0 users

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


Attachments (Terms of Use)

Description santini 2001-05-28 09:58:52 UTC
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 16:33:36 UTC
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.