diff options
author | wiz <wiz@pkgsrc.org> | 2015-01-23 04:06:08 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2015-01-23 04:06:08 +0000 |
commit | 0a72cb1130d414ab6b8d4d99c2ea69591cfdde5c (patch) | |
tree | c32bb99e0680c92c08b19f539bddf1959eac5cc0 /devel | |
parent | 14c46b9c689e27412a0f1531aa7f570fcbe682a7 (diff) | |
download | pkgsrc-0a72cb1130d414ab6b8d4d99c2ea69591cfdde5c.tar.gz |
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 (limited to 'devel')
-rw-r--r-- | devel/cmake/Makefile | 3 | ||||
-rw-r--r-- | devel/cmake/distinfo | 3 | ||||
-rw-r--r-- | devel/cmake/patches/patch-Source_kwsys_Directory.cxx | 27 |
3 files changed, 31 insertions, 2 deletions
diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile index 8ca8fb039b7..6549977e0ae 100644 --- a/devel/cmake/Makefile +++ b/devel/cmake/Makefile @@ -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 --git a/devel/cmake/distinfo b/devel/cmake/distinfo index 9a106bfadf3..4d9a740275b 100644 --- a/devel/cmake/distinfo +++ b/devel/cmake/distinfo @@ -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_FindX11.cmake) = 07a831744fc1de15d2fe4f57399339200e572dc5 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 --git a/devel/cmake/patches/patch-Source_kwsys_Directory.cxx b/devel/cmake/patches/patch-Source_kwsys_Directory.cxx new file mode 100644 index 00000000000..c28590e209e --- /dev/null +++ b/devel/cmake/patches/patch-Source_kwsys_Directory.cxx @@ -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; + } + |