Bug 74931 - GtkSalFrame::UpdateSettings() can crash if it can't get an unused graphics instance
Summary: GtkSalFrame::UpdateSettings() can crash if it can't get an unused graphics in...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Chris Sherlock
Whiteboard: target:4.3.0
Depends on:
Reported: 2014-02-13 14:56 UTC by Chris Sherlock
Modified: 2014-02-14 09:08 UTC (History)
0 users

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Sherlock 2014-02-13 14:56:13 UTC
In GtkSalFrame::UpdateSettings, we need to get an unused GtkSalGraphics instance with which to update the settings. To get the graphics, we call on GtkSalFrame::GetGraphics, however the semantics of this function are such that if it can't find an unused graphics then it will return NULL to let us know. 

Unfortunately, we don't do a NULL check, and just assume that it will always return a valid graphics pointer. Hence LO will crash.
Comment 1 Commit Notification 2014-02-14 09:07:44 UTC
Chris Sherlock committed a patch related to this issue.
It has been pushed to "master":


fdo#74931 Prevent UpdateSettings from dereferencing null pointer

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.