freebsd-ports/sysutils/smartmontools/files/patch-os__freebsd.cpp
Tijl Coosemans d34939e7a9 Add a patch to zero-initialise a variable that is passed to the kernel
where it could trigger assertions.

PR:		178032
Submitted by:	op@hardenedbsd.org
Approved by:	samm@os2.kiev.ua (maintainer)
Sponsored by:	opBSD
2017-02-07 15:49:27 +00:00

11 lines
296 B
C++

--- os_freebsd.cpp.orig 2016-12-17 18:42:22 UTC
+++ os_freebsd.cpp
@@ -1936,6 +1936,8 @@ smart_device * freebsd_smart_interface::
int i;
const char * test_name = name;
+ memset(&ccb, 0, sizeof(ccb));
+
// if dev_name null, or string length zero
if (!name || !*name)
return 0;