pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/cmake When opendir() fails, readdir() is called ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/804213b9a78e
branches: trunk
changeset: 645089:804213b9a78e
user: wiz <wiz%pkgsrc.org@localhost>
date: Fri Jan 23 04:06:08 2015 +0000
description:
When opendir() fails, readdir() is called with a NULL pointer, leading to
a segfault.
Reported at http://public.kitware.com/Bug/view.php?id=15367
Bump PKGREVISION.
diffstat:
devel/cmake/Makefile | 3 +-
devel/cmake/distinfo | 3 +-
devel/cmake/patches/patch-Source_kwsys_Directory.cxx | 27 ++++++++++++++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
diffs (60 lines):
diff -r b064af422704 -r 804213b9a78e devel/cmake/Makefile
--- a/devel/cmake/Makefile Fri Jan 23 01:18:53 2015 +0000
+++ b/devel/cmake/Makefile Fri Jan 23 04:06:08 2015 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.91 2015/01/17 13:29:55 adam Exp $
+# $NetBSD: Makefile,v 1.92 2015/01/23 04:06:08 wiz Exp $
DISTNAME= cmake-${CMAKE_API}.0
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://www.cmake.org/files/v${CMAKE_API}/
diff -r b064af422704 -r 804213b9a78e devel/cmake/distinfo
--- a/devel/cmake/distinfo Fri Jan 23 01:18:53 2015 +0000
+++ b/devel/cmake/distinfo Fri Jan 23 04:06:08 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.63 2015/01/17 13:29:55 adam Exp $
+$NetBSD: distinfo,v 1.64 2015/01/23 04:06:08 wiz Exp $
SHA1 (cmake-3.1.0.tar.gz) = cc20c40f5480c83a0204f516a490b470bd3a963a
RMD160 (cmake-3.1.0.tar.gz) = 00390c46b82fda47bb13fc740d4cd037bf66a8c1
@@ -7,6 +7,7 @@
SHA1 (patch-Modules_Platform_SCO__SV.cmake) = 3ed230b3a06ea693812db8f57bc73aebec12b99f
SHA1 (patch-Modules_Platform_SunOS.cmake) = 7a53ae3c902dd69ee22ef9fe0ae2a022d5284f16
SHA1 (patch-Source_cmELF.cxx) = 5eb9dc0b3567b5685596ddf0a03ca8e5c76e6f92
+SHA1 (patch-Source_kwsys_Directory.cxx) = 35eb0872636a3f0e20eb2169f101a0a540d79642
SHA1 (patch-Source_kwsys_SystemInformation.cxx) = e259da70601cf1b4641f253de3d4f3aaec5e68f6
SHA1 (patch-Source_kwsys_SystemTools.cxx) = 634348b9bc8ccf8c72f23837baa6ba0bcacf5961
SHA1 (patch-Utilities_KWIML_CMakeLists.txt) = 4e8cef0eab2ad8cb27cd7076e077bb5e7425a95c
diff -r b064af422704 -r 804213b9a78e devel/cmake/patches/patch-Source_kwsys_Directory.cxx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cmake/patches/patch-Source_kwsys_Directory.cxx Fri Jan 23 04:06:08 2015 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-Source_kwsys_Directory.cxx,v 1.1 2015/01/23 04:06:08 wiz Exp $
+
+When opendir() fails, readdir() is called with a NULL pointer, leading to
+a segfault.
+
+http://public.kitware.com/Bug/view.php?id=15367
+
+--- Source/kwsys/Directory.cxx.orig 2014-12-15 20:07:43.000000000 +0000
++++ Source/kwsys/Directory.cxx
+@@ -240,11 +240,14 @@ unsigned long Directory::GetNumberOfFile
+ DIR* dir = opendir(name.c_str());
+
+ unsigned long count = 0;
+- for (dirent* d = readdir(dir); d; d = readdir(dir) )
++ if (dir)
+ {
+- count++;
++ for (dirent* d = readdir(dir); d; d = readdir(dir) )
++ {
++ count++;
++ }
++ closedir(dir);
+ }
+- closedir(dir);
+ return count;
+ }
+
Home |
Main Index |
Thread Index |
Old Index