dbus-1/dbus-cve-2012-3524.patch

29 lines
1.0 KiB
Diff

--- dbus-1.5.12/configure.ac 2012-08-28 10:28:12.000000000 +0200
+++ dbus-1.5.12/configure.ac 2012-08-28 10:28:17.000000000 +0200
@@ -578,7 +578,7 @@
AC_SEARCH_LIBS(socket,[socket network])
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
-AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull)
+AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull __secure_getenv)
AC_CHECK_HEADERS([syslog.h])
if test "x$ac_cv_header_syslog_h" = "xyes"; then
--- dbus-1.5.12/dbus/dbus-sysdeps.c 2012-08-28 10:28:12.000000000 +0200
+++ dbus-1.5.12/dbus/dbus-sysdeps.c 2012-08-28 10:28:17.000000000 +0200
@@ -181,8 +181,12 @@
*/
const char*
_dbus_getenv (const char *varname)
-{
- return getenv (varname);
+{
+#ifdef HAVE___SECURE_GETENV
+ return __secure_getenv(varname);
+#else
+ return getenv(varname);
+#endif
}
/**