mirror of
https://git.freebsd.org/ports.git
synced 2025-06-21 04:30:37 -04:00
...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:
de954c9529
Not handed in for maintainer approval because obviously correct,
maintainer will be notified though.
11 lines
324 B
C++
11 lines
324 B
C++
--- 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);
|
|
|