Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202073 - media-gfx/splashutils-1.5.2.1 segfaults on config file parse errors
Summary: media-gfx/splashutils-1.5.2.1 segfaults on config file parse errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard: fixed
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-12 18:35 UTC by James Bowlin
Modified: 2007-12-16 19:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Bowlin 2007-12-12 18:35:42 UTC
The config file parser in splashutils-1.5.2.1 segfaults when it encounters a 9-digit color specification in a theme config file instead of the expected 8 digits.  The older versions did not do this.

Reproducible: Always

Steps to Reproduce:
1. Add an extra digit to a color specification in a theme config file
2. Set this theme to be the first of many in /etc/conf.d/fbcondecor
3. run /etc/init.d/fbcondecor start

or simply use splash_manager to set the theme.

Actual Results:  
$ sudo splash_manager -c set -t Gentoo-darker --tty=1                         
Parse error at line 34: expected a color instead of '040454498'
/usr/bin/splash_manager: line 168: 32473 Segmentation fault      ${spl_decor} -c setcfg -t "${theme}" --tty="${tty}"
FBIOCONDECOR_SETSTATE failed, error code 22.

A similar error message occurs when starting the fbcondecor service but there is no clue as to which file has the parse error in it.

Expected Results:  
I would have expected the new version to parse config files the same way the old version did. But barring that, I would have expected a more graceful resolution of parse errors:

  1) A more informative error message indicating the file that had the error.
  2) A warning on a parse error instead of a segfault.
  3) Have the fbcondecor service either skip the tty with the bad config file
     or replace the theme with the default.   Of course, an informative error
     message should be issued as well.
   

The current error handling is adequate when using splash_manager but it is totally inadequate when running the fbcondecor service.  It is particularly nasty because the parser got changed so files that would parse okay with the older version now cause segfaults.
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2007-12-16 19:22:05 UTC
Fixed in 1.5.3.2.  Thanks for a detailed description of the problem :)