Bug 494193 - xfig crashes when attempting to print
Summary: xfig crashes when attempting to print
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: xfig
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Stepan Kasal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-05 14:28 UTC by Ian Dall
Modified: 2009-04-27 21:38 UTC (History)
3 users (show)

Fixed In Version: 3.2.5-19.a.fc10
Clone Of:
Environment:
Last Closed: 2009-04-27 21:38:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ian Dall 2009-04-05 14:28:22 UTC
Description of problem:

xfig crashes when attempting to print if PRINTER environment variable is not set.

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

xfig-3.2.5-18.a.fc10.i386

How reproducible:

Always

Steps to Reproduce:
1.unset PRINTER environment variable
2.ensure printer resource is not set
3.run xfig
4.create a simple drawing
5.select File->Print
  
Actual results:
SIGSEGV

Expected results:
A printer panel.


Additional info:

A backtrace shows that strchr is called with a null pointer 

#0  0xb7b30d03 in strchr () from /lib/libc.so.6
#1  0x080eedc8 in create_print_panel (w=0xa0a7d68) at w_print.c:961



This is because getenv("PRINTER") returned null. A fix would be (line 961)

    if (printer_val && strchr(printer_val,'\\')) {

in place of 

    if (strchr(printer_val,'\\')) {

Comment 1 Fedora Update System 2009-04-08 16:12:40 UTC
xfig-3.2.5-19.a.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/xfig-3.2.5-19.a.fc10

Comment 2 Hans de Goede 2009-04-08 16:13:24 UTC
Thanks for reporting and for the fix! I've accredited you in the changelog :)

An update its on its way to update-testing, the update system will post a comment
here when its available there.

Comment 3 Fedora Update System 2009-04-09 16:08:49 UTC
xfig-3.2.5-19.a.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xfig'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-3440

Comment 4 Fedora Update System 2009-04-27 21:38:12 UTC
xfig-3.2.5-19.a.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


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