svn commit: r525547 - in head/graphics/lensfun: . files
Matthias Andree
mandree at FreeBSD.org
Sat Feb 8 13:15:45 UTC 2020
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);
+
More information about the svn-ports-all
mailing list