~cairo-dock-team/cairo-dock-core/cairo-dock

Viewing all changes in revision 1833.

  • Committer: Matthieu Baerts
  • Date: 2014-10-13 09:42:11 UTC
  • Revision ID: matttbe@gmail.com-20141013094211-5z2zsqrjo3pvcg51
X Mgr: a WM class can contain whitespaces (when devs don't respect rules...)

If there are whitespaces in the class, it will no longer be possible to find a dash char and then this code will cause a crash:

    id_end = strrchr (str, '-');
    *id_end = '\0';

Fixed by adding a if check and also by not end the string when there is a whitespace

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: