From owner-svn-ports-all@freebsd.org Thu Feb 22 11:56:46 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF9DFF26800; Thu, 22 Feb 2018 11:56:45 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93E427E228; Thu, 22 Feb 2018 11:56:45 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E95F2743A; Thu, 22 Feb 2018 11:56:45 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1MBuj7m054595; Thu, 22 Feb 2018 11:56:45 GMT (envelope-from madpilot@FreeBSD.org) Received: (from madpilot@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1MBujGN054593; Thu, 22 Feb 2018 11:56:45 GMT (envelope-from madpilot@FreeBSD.org) Message-Id: <201802221156.w1MBujGN054593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: madpilot set sender to madpilot@FreeBSD.org using -f From: Guido Falsi Date: Thu, 22 Feb 2018 11:56:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r462584 - in head/x11-fm/thunar: . files X-SVN-Group: ports-head X-SVN-Commit-Author: madpilot X-SVN-Commit-Paths: in head/x11-fm/thunar: . files X-SVN-Commit-Revision: 462584 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2018 11:56:46 -0000 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 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)