aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorrobak <robak@FreeBSD.org>2015-03-13 22:26:17 +0800
committerrobak <robak@FreeBSD.org>2015-03-13 22:26:17 +0800
commit4277a74a24544ce99eb5810e7a38b2e200cb8fb6 (patch)
tree32d6cd1a80ea0abe54f68acccf2d567ec22c7ddc /x11
parent78a41e2a0e819611b148fa3e8467ddc87d7b1f79 (diff)
downloadfreebsd-ports-gnome-4277a74a24544ce99eb5810e7a38b2e200cb8fb6.tar.gz
freebsd-ports-gnome-4277a74a24544ce99eb5810e7a38b2e200cb8fb6.tar.zst
freebsd-ports-gnome-4277a74a24544ce99eb5810e7a38b2e200cb8fb6.zip
x11/slim: fix malloc and memcpy arguments
PR: 198465 Submitted by: Henry Hu <henry.hu.sh@gmail.com>
Diffstat (limited to 'x11')
-rw-r--r--x11/slim/Makefile2
-rw-r--r--x11/slim/files/patch-app.cpp13
2 files changed, 13 insertions, 2 deletions
diff --git a/x11/slim/Makefile b/x11/slim/Makefile
index a339975e788c..67768e773327 100644
--- a/x11/slim/Makefile
+++ b/x11/slim/Makefile
@@ -3,7 +3,7 @@
PORTNAME= slim
PORTVERSION= 1.3.6
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= x11
MASTER_SITES= ftp://ftp.berlios.de/pub/slim/ \
SF/slim.berlios
diff --git a/x11/slim/files/patch-app.cpp b/x11/slim/files/patch-app.cpp
index 2ca2423583f8..cd72304ee9d8 100644
--- a/x11/slim/files/patch-app.cpp
+++ b/x11/slim/files/patch-app.cpp
@@ -1,5 +1,5 @@
--- app.cpp.orig 2013-10-01 18:38:05.000000000 -0400
-+++ app.cpp 2014-12-18 00:18:29.000000000 -0500
++++ app.cpp 2015-03-08 14:34:54.992147000 -0400
@@ -14,6 +14,7 @@
#include <unistd.h>
#include <fcntl.h>
@@ -52,6 +52,17 @@
#ifdef USE_PAM
App::App(int argc, char** argv)
: pam(conv, static_cast<void*>(&LoginPanel)),
+@@ -596,8 +627,8 @@
+
+ n++;
+
+- child_env = static_cast<char**>(malloc(sizeof(char*)*n));
+- memcpy(child_env, old_env, sizeof(char*)*n+1);
++ child_env = static_cast<char**>(malloc(sizeof(char*)*(n+1)));
++ memcpy(child_env, old_env, sizeof(char*)*n);
+ child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie());
+ child_env[n] = NULL;
+ # endif /* USE_CONSOLEKIT */
@@ -627,6 +658,17 @@
#endif