From owner-svn-ports-all@freebsd.org Sat Feb 8 13:15:45 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 023622424F2; Sat, 8 Feb 2020 13:15:45 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48FCN06CQcz3KjP; Sat, 8 Feb 2020 13:15:44 +0000 (UTC) (envelope-from mandree@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 B62EB1DEB0; Sat, 8 Feb 2020 13:15:44 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 018DFiHm060333; Sat, 8 Feb 2020 13:15:44 GMT (envelope-from mandree@FreeBSD.org) Received: (from mandree@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 018DFi7l060330; Sat, 8 Feb 2020 13:15:44 GMT (envelope-from mandree@FreeBSD.org) Message-Id: <202002081315.018DFi7l060330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mandree set sender to mandree@FreeBSD.org using -f From: Matthias Andree Date: Sat, 8 Feb 2020 13:15:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r525547 - in head/graphics/lensfun: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mandree X-SVN-Commit-Paths: in head/graphics/lensfun: . files X-SVN-Commit-Revision: 525547 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.29 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: Sat, 08 Feb 2020 13:15:45 -0000 Author: mandree Date: Sat Feb 8 13:15:43 2020 New Revision: 525547 URL: https://svnweb.freebsd.org/changeset/ports/525547 Log: lensfun: allocate buffers for AddMount()/AddCompat() large enough ...so that they can hold the terminating '\0' in C strings. Found with clang's -fsanitize=address while debugging RawTherapee 5.8 crashers. Later found to be already fixed upstream here: https://github.com/lensfun/lensfun/commit/de954c952929316ea2ad0f6f1e336d9d8164ace0 Not handed in for maintainer approval because obviously correct, maintainer will be notified though. Added: head/graphics/lensfun/files/patch-libs_lensfun_lens.cpp (contents, props changed) head/graphics/lensfun/files/patch-libs_lensfun_mount.cpp (contents, props changed) Modified: head/graphics/lensfun/Makefile Modified: head/graphics/lensfun/Makefile ============================================================================== --- head/graphics/lensfun/Makefile Sat Feb 8 12:50:18 2020 (r525546) +++ head/graphics/lensfun/Makefile Sat Feb 8 13:15:43 2020 (r525547) @@ -3,6 +3,7 @@ PORTNAME= lensfun PORTVERSION= 0.3.95 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/${PORTVERSION} Added: head/graphics/lensfun/files/patch-libs_lensfun_lens.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/lensfun/files/patch-libs_lensfun_lens.cpp Sat Feb 8 13:15:43 2020 (r525547) @@ -0,0 +1,11 @@ +--- libs/lensfun/lens.cpp.orig 2018-06-29 10:29:17 UTC ++++ libs/lensfun/lens.cpp +@@ -130,7 +130,7 @@ void lfLens::AddMount (const char *val) + { + if (val) + { +- char* p = (char*)malloc(strlen(val)); ++ char* p = (char*)malloc(strlen(val) + 1); + strcpy(p, val); + MountNames.push_back(p); + Added: head/graphics/lensfun/files/patch-libs_lensfun_mount.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/lensfun/files/patch-libs_lensfun_mount.cpp Sat Feb 8 13:15:43 2020 (r525547) @@ -0,0 +1,11 @@ +--- libs/lensfun/mount.cpp.orig 2018-06-29 10:29:17 UTC ++++ libs/lensfun/mount.cpp +@@ -60,7 +60,7 @@ void lfMount::AddCompat (const char *val) + { + if (val) + { +- char* p = (char*)malloc(strlen(val)); ++ char* p = (char*)malloc(strlen(val) + 1); + strcpy(p, val); + MountCompat.push_back(p); +