svn commit: r462584 - in head/x11-fm/thunar: . files

Guido Falsi madpilot at FreeBSD.org
Thu Feb 22 11:56:46 UTC 2018


Author: madpilot
Date: Thu Feb 22 11:56:45 2018
New Revision: 462584
URL: https://svnweb.freebsd.org/changeset/ports/462584

Log:
  Add patches to thunar from upstream bug report to mitigate crash
  when renaming files.
  
  The patch replaces some calls to strcmp() which are sometimes getting
  NULL pointers, causing a crash, with safe calls to g_strcmp0()
  calls, which handle NULL pointers gracefully.
  
  I'm also adding a patch in another code path checking for a pointer
  to actually point to the correct structure and not being NULL.
  
  These patches seem to actually prevent the reported crash from
  happening.
  
  PR:		217946
  Submitted by:	Marko Cupac <marko.cupac at mimar.rs>
  Obtained from:	https://bugzilla.xfce.org/show_bug.cgi?id=12264

Added:
  head/x11-fm/thunar/files/patch-thunar_thunar-file.c   (contents, props changed)
Modified:
  head/x11-fm/thunar/Makefile

Modified: head/x11-fm/thunar/Makefile
==============================================================================
--- head/x11-fm/thunar/Makefile	Thu Feb 22 11:11:22 2018	(r462583)
+++ head/x11-fm/thunar/Makefile	Thu Feb 22 11:56:45 2018	(r462584)
@@ -3,6 +3,7 @@
 
 PORTNAME=	Thunar
 DISTVERSION=	1.6.14
+PORTREVISION=	1
 CATEGORIES=	x11-fm xfce
 MASTER_SITES=	XFCE/src/xfce/${PORTNAME:tl}/${PORTVERSION:R}
 DIST_SUBDIR=	xfce4

Added: head/x11-fm/thunar/files/patch-thunar_thunar-file.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fm/thunar/files/patch-thunar_thunar-file.c	Thu Feb 22 11:56:45 2018	(r462584)
@@ -0,0 +1,27 @@
+--- thunar/thunar-file.c.orig	2017-11-25 16:54:56 UTC
++++ thunar/thunar-file.c
+@@ -3966,7 +3966,9 @@ thunar_file_unwatch (ThunarFile *file)
+ gboolean
+ thunar_file_reload (ThunarFile *file)
+ {
+-  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
++  /* if the file has already been destroyed, break here */
++  if (!THUNAR_IS_FILE (file))
++      return FALSE;
+ 
+   /* clear file pxmap cache */
+   thunar_icon_factory_clear_pixmap_cache (file);
+@@ -4090,11 +4092,11 @@ thunar_file_compare_by_name (const ThunarFile *file_a,
+ 
+   /* case insensitive checking */
+   if (G_LIKELY (!case_sensitive))
+-    result = strcmp (file_a->collate_key_nocase, file_b->collate_key_nocase);
++    result = g_strcmp0 (file_a->collate_key_nocase, file_b->collate_key_nocase);
+ 
+   /* fall-back to case sensitive */
+   if (result == 0)
+-    result = strcmp (file_a->collate_key, file_b->collate_key);
++    result = g_strcmp0 (file_a->collate_key, file_b->collate_key);
+ 
+   /* this happens in the trash */
+   if (result == 0)


More information about the svn-ports-head mailing list