! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-power-manager crashes when inactivity settings (ac or battery) are changed
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Debbie Beliveau 2010-12-17 02:57:47 CET
Created attachment 3285 
Proposed fix for crash

Steps to reproduce:
1. Verify that the xfce4-power-manager process is running
2. Launch xfce4-power-manager-settings
3. In the "On AC" or "On Battery" tab, change the "Put the computer to sleep when inactive for" setting
4. Close xfce4-power-manager-settings
5. Check if xfce4-power-manager process is still running

Result: xfce4-power-manager process is no longer running (it has crashed)
Expect: xfce4-power-manager process to still be running

Details:
xfpm_manager_set_idle_alarm_on_ac and xfpm_manager_set_idle_alarm_on_battery callbacks have the wrong prototypes.  This results in the GObject for the callback (a pointer to XfpmXfconf) being used as the callback's data (a pointer to XfpmManager).  When the pointer to an XfpmXfconf structure is de-referenced as a XfpmManager structure, invalid memory is dereferenced and xfce4-power-manager crashes.  The user will not know xfce4-power-manager crashes but may wonder why their system does not suspend on inactivity or why an "Xfce4 Power Manager is not running, do you want to launch it now?" question is displayed the next time xfce4-power-manager-settings is run.

Attaching a patched for a proposed fix.
Comment 1 Ali Abdallah editbugs 2010-12-19 13:27:14 CET
Fixed in 1.0.2, thanks for the report.

Bug #7007

Reported by:
Debbie Beliveau
Reported on: 2010-12-17
Last modified on: 2010-12-19

People

Assignee:
Ali Abdallah
CC List:
0 users

Version

Attachments

Proposed fix for crash (1.66 KB, patch)
2010-12-17 02:57 CET , Debbie Beliveau
no flags

Additional information