! 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 !
Thunar segfaults when clicking on "network"
Status:
RESOLVED: FIXED

Comments

Description chrisdhaag 2011-01-29 17:33:29 CET
Created attachment 3442 
Backtrace of thunar with -g and not stripped

What the title says.

strcasecmp doesn't like null arguments.

I changed the block at 1647 this way

  if (!case_sensitive)
{
    if(!description_a)
      printf("a: NULL!\n");
    if(!description_b)
      printf("b: NULL!\n");
    result = strcasecmp (description_a, description_b);
}
  else
    result = strcmp (description_a, description_b);

and when clicking on "network" I got the output
a: NULL!
b: NULL!

The problem is only in this block, because the following primitive patch solves it.
Comment 1 chrisdhaag 2011-01-29 17:34:31 CET
Created attachment 3443 
primitive patch that sets single character if value is NULL
Comment 2 Jannis Pohlmann editbugs 2011-01-29 18:30:59 CET
commit aabb332fb07aa7b86c74eae518cadd9764c296ed
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Sat Jan 29 18:27:15 2011 +0100

    Fix segfault when calling strcasecmp with NULL parameters (bug #7206).

Bug #7206

Reported by:
chrisdhaag
Reported on: 2011-01-29
Last modified on: 2011-01-29

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Attachments

Additional information