Bug 185269
Summary: | xsane segfaults on startup | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Brian Gerst <brgerst> | ||||||
Component: | xsane | Assignee: | Nils Philippsen <nphilipp> | ||||||
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | David Lawrence <dkl> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | a1_canon, aldyh, triage | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | bzcl34nup | ||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2008-05-07 00:26:31 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Brian Gerst
2006-03-13 01:56:52 UTC
Backtrace: (gdb) bt #0 0x0000000000440a57 in preferences_restore (fd=2376) at xsane-preferences.c:455 #1 0x000000000045bf9d in xsane_init (argc=1, argv=0x7fffff9c96a8) at xsane.c:1910 #2 0x000000000046863b in xsane_interface (argc=1, argv=0x7fffff9c96a8) at xsane.c:5804 #3 0x0000000000469673 in main (argc=1, argv=0x7fffff9c96a8) at xsane.c:6053 #4 0x0000003b6d21d084 in __libc_start_main () from /lib64/libc.so.6 #5 0x0000000000408a29 in _start () #6 0x00007fffff9c9698 in ?? () #7 0x0000000000000000 in ?? () How about 'rm -rf ~/.sane/xsane'? That fixed it. A bad config file shouldn't cause it to segfault though. I hope you have a backup of your config file, otherwise debugging the problem might get (even more ;-) painful. Created attachment 126097 [details]
Config files
Old config files
Created attachment 127299 [details]
fix segfault
The problem happens while parsing an unknown preference string which is
followed by a number on the subsequent line.
In my case:
"mail-smtp-port"
25
In xsane-0.99-2.2 it looks like the new option is e-mail-smtp-port, not
mail-smtp-port.
In xsane-preferences.c:preferences_restore() we trigger an unknown identifier
on "mail-smtp-port", then when parsing 25, we realize it is not a string here:
if (w.status == EINVAL) /* not a string */
{
w.status = 0;
xsane_rc_io_w_skip_newline(&w); /* skip this line */
}
but by then xsane_rc_io_w_string() has set <name> to NULL.
The problem happens when we try to dereference <name> here:
else if (!strcmp(name, "medium-definitions"))
Notice this if is outside the scope where we know "name" to be a valid
identifier.
I am attaching a patch that fixes the problem. An alternative solution is to
check that name is not null first.
I've updated the medium-definitions patch accordingly. Packages for Rawhide and FC-5 are building right now. Based on the date this bug was created, it appears to have been reported against rawhide during the development of a Fedora release that is no longer maintained. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained. If this bug remains in NEEDINFO thirty (30) days from now, we will automatically close it. If you can reproduce this bug in a maintained Fedora version (7, 8, or rawhide), please change this bug to the respective version and change the status to ASSIGNED. (If you're unable to change the bug's version or status, add a comment to the bug and someone will change it for you.) Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again. This bug has been in NEEDINFO for more than 30 days since feedback was first requested. As a result we are closing it. If you can reproduce this bug in the future against a maintained Fedora version please feel free to reopen it against that version. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp |