pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/smartmontools Fix memory corruption on NetBSD...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8cebafd1fb11
branches:  trunk
changeset: 396954:8cebafd1fb11
user:      alnsn <alnsn%pkgsrc.org@localhost>
date:      Thu Jun 13 07:58:31 2019 +0000

description:
Fix memory corruption on NetBSD-current.

Bump PKGREVISION.

diffstat:

 sysutils/smartmontools/Makefile                     |   4 ++--
 sysutils/smartmontools/distinfo                     |   3 ++-
 sysutils/smartmontools/patches/patch-os__netbsd.cpp |  19 +++++++++++++++++++
 3 files changed, 23 insertions(+), 3 deletions(-)

diffs (50 lines):

diff -r e24d6be0647a -r 8cebafd1fb11 sysutils/smartmontools/Makefile
--- a/sysutils/smartmontools/Makefile   Thu Jun 13 07:55:25 2019 +0000
+++ b/sysutils/smartmontools/Makefile   Thu Jun 13 07:58:31 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.36 2019/02/15 20:38:29 triaxx Exp $
+# $NetBSD: Makefile,v 1.37 2019/06/13 07:58:31 alnsn Exp $
 
 DISTNAME=              smartmontools-7.0
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            sysutils
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=smartmontools/}
 
diff -r e24d6be0647a -r 8cebafd1fb11 sysutils/smartmontools/distinfo
--- a/sysutils/smartmontools/distinfo   Thu Jun 13 07:55:25 2019 +0000
+++ b/sysutils/smartmontools/distinfo   Thu Jun 13 07:58:31 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.34 2019/02/15 20:38:29 triaxx Exp $
+$NetBSD: distinfo,v 1.35 2019/06/13 07:58:31 alnsn Exp $
 
 SHA1 (smartmontools-7.0.tar.gz) = 00e6a7bb26b283695ab0deaf521be6723ba44f0a
 RMD160 (smartmontools-7.0.tar.gz) = db20533115aa05a52836dbef0006c664083fbe90
@@ -8,3 +8,4 @@
 SHA1 (patch-ag) = 01b0b35d89d6d6a11b13b3c05a141c46a0c1590b
 SHA1 (patch-nvmecmds.cpp) = 0fec043f00b4a7fde2974e1a4670ce42343f2d52
 SHA1 (patch-os__freebsd.cpp) = 96db45ca207e3a2f0d454f7b5c8b1b0d4e8a3e9c
+SHA1 (patch-os__netbsd.cpp) = abbaec99e900ca6e58b63417e4ff201d8fa071c0
diff -r e24d6be0647a -r 8cebafd1fb11 sysutils/smartmontools/patches/patch-os__netbsd.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smartmontools/patches/patch-os__netbsd.cpp       Thu Jun 13 07:58:31 2019 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-os__netbsd.cpp,v 1.5 2019/06/13 07:58:31 alnsn Exp $
+
+Apply upstream commit r4919 to fix memory corruption.
+
+--- os_netbsd.cpp.orig 2018-09-16 15:03:22.000000000 +0000
++++ os_netbsd.cpp
+@@ -602,6 +602,12 @@ int netbsd_smart_interface::get_dev_name
+     sprintf(mp[n], "%s%s%c", net_dev_raw_prefix, p, 'a' + getrawpartition());
+     n++;
+   }
++  free(disknames);
++
++  if (n == 0) {
++    free(mp);
++    return 0;
++  }
+ 
+   char ** tmp = (char **)realloc(mp, n * (sizeof(char *)));
+   if (NULL == tmp) {



Home | Main Index | Thread Index | Old Index