! 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 !
malformed .directory files cause crash
Status:
RESOLVED: FIXED

Comments

Description Alistair Buxton 2013-10-01 00:38:31 CEST
Created attachment 5167 
Patch which prevents the crash.

To see the bug in action:

mkdir -p ~/.local/share/desktop-directories/
touch ~/.local/share/desktop-directories/xfce-accessories.directory

xfdesktop will immediately crash. xfce4-panel will crash the next time you open the menu.

This happens because garcon does not read the menu's name from the empty file. It then tries to construct the menu with name == NULL. Later, it tries to validate that the name is utf8, passing NULL to g_utf8_validate which causes a segfault.

Patch is attached, but maybe it's not the best way to handle the problem. It prevents the crash though.
Comment 1 Nick Schermer editbugs 2013-12-07 12:24:50 CET
Pushed. Thanks.

Bug #10381

Reported by:
Alistair Buxton
Reported on: 2013-10-01
Last modified on: 2013-12-07

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Patch which prevents the crash. (1.15 KB, patch)
2013-10-01 00:38 CEST , Alistair Buxton
no flags

Additional information