mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
extra/lensfun to 0.3.95-2
This commit is contained in:
parent
98ad5e6a6d
commit
058161b691
2 changed files with 74 additions and 4 deletions
|
@ -5,16 +5,23 @@
|
|||
|
||||
pkgname=lensfun
|
||||
pkgver=0.3.95
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Database of photographic lenses and a library that allows advanced access to the database"
|
||||
arch=(x86_64)
|
||||
url="https://lensfun.sourceforge.net"
|
||||
url="https://lensfun.github.io/"
|
||||
license=('LGPL3')
|
||||
depends=('glib2')
|
||||
makedepends=('python' 'libpng' 'doxygen' 'cmake')
|
||||
optdepends=('python: for lensfun-update-data and lensfun-add-adapter')
|
||||
source=("https://sourceforge.net/projects/lensfun/files/${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
||||
sha256sums=('82c29c833c1604c48ca3ab8a35e86b7189b8effac1b1476095c0529afb702808')
|
||||
source=("https://sourceforge.net/projects/lensfun/files/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
lensfun-segfault.patch)
|
||||
sha256sums=('82c29c833c1604c48ca3ab8a35e86b7189b8effac1b1476095c0529afb702808'
|
||||
'090804382c134b813693770383d21289a74f2b7e221127f2634abf3d24b003da')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
patch -p1 -i ../lensfun-segfault.patch # Fix null pointer dereference # https://github.com/lensfun/lensfun/issues/1132
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
|
|
63
extra/lensfun/lensfun-segfault.patch
Normal file
63
extra/lensfun/lensfun-segfault.patch
Normal file
|
@ -0,0 +1,63 @@
|
|||
diff --git a/libs/lensfun/lens.cpp b/libs/lensfun/lens.cpp
|
||||
index 52b76658..b8430609 100644
|
||||
--- a/libs/lensfun/lens.cpp
|
||||
+++ b/libs/lensfun/lens.cpp
|
||||
@@ -66,9 +66,10 @@ lfLens::lfLens (const lfLens &other)
|
||||
Mounts = NULL;
|
||||
MountNames.clear();
|
||||
const char* const* otherMounts = other.GetMountNames();
|
||||
- for (int i = 0; otherMounts[i]; i++)
|
||||
- AddMount(otherMounts[i]);
|
||||
-
|
||||
+ if (otherMounts) {
|
||||
+ for (int i = 0; otherMounts[i]; i++)
|
||||
+ AddMount(otherMounts[i]);
|
||||
+ }
|
||||
for (auto *calibset : other.Calibrations)
|
||||
Calibrations.push_back(new lfLensCalibrationSet(*calibset));
|
||||
|
||||
@@ -96,9 +97,10 @@ lfLens &lfLens::operator = (const lfLens &other)
|
||||
Mounts = NULL;
|
||||
MountNames.clear();
|
||||
const char* const* otherMounts = other.GetMountNames();
|
||||
- for (int i = 0; otherMounts[i]; i++)
|
||||
- AddMount(otherMounts[i]);
|
||||
-
|
||||
+ if (otherMounts) {
|
||||
+ for (int i = 0; otherMounts[i]; i++)
|
||||
+ AddMount(otherMounts[i]);
|
||||
+ }
|
||||
for (auto *calibset : Calibrations)
|
||||
delete calibset;
|
||||
Calibrations.clear();
|
||||
diff --git a/libs/lensfun/mount.cpp b/libs/lensfun/mount.cpp
|
||||
index bd875baa..86f667cb 100644
|
||||
--- a/libs/lensfun/mount.cpp
|
||||
+++ b/libs/lensfun/mount.cpp
|
||||
@@ -28,8 +28,10 @@ lfMount::lfMount (const lfMount &other)
|
||||
|
||||
MountCompat.clear();
|
||||
const char* const* otherMounts = other.GetCompats();
|
||||
- for (int i = 0; otherMounts[i]; i++)
|
||||
- AddCompat(otherMounts[i]);
|
||||
+ if (otherMounts) {
|
||||
+ for (int i = 0; otherMounts[i]; i++)
|
||||
+ AddCompat(otherMounts[i]);
|
||||
+ }
|
||||
}
|
||||
|
||||
lfMount &lfMount::operator = (const lfMount &other)
|
||||
@@ -40,9 +42,10 @@ lfMount &lfMount::operator = (const lfMount &other)
|
||||
|
||||
MountCompat.clear();
|
||||
const char* const* otherMounts = other.GetCompats();
|
||||
- for (int i = 0; otherMounts[i]; i++)
|
||||
- AddCompat(otherMounts[i]);
|
||||
-
|
||||
+ if (otherMounts) {
|
||||
+ for (int i = 0; otherMounts[i]; i++)
|
||||
+ AddCompat(otherMounts[i]);
|
||||
+ }
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in a new issue