From cf0d63aa3f445a52fc95dc433ea3f5947714d1ee Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Tue, 29 Jun 2010 18:15:20 +0000 Subject: [PATCH] Patch to fix stack protector sig abort that occurs when ipc buffer is too short. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2974 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/coroipcs.c | 1 + include/corosync/coroipc_ipc.h | 8 ++++---- lib/coroipcc.c | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/exec/coroipcs.c b/exec/coroipcs.c index c9059c17..923ed877 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -38,6 +38,7 @@ #define _GNU_SOURCE 1 #endif #include +#include #include #include #include diff --git a/include/corosync/coroipc_ipc.h b/include/corosync/coroipc_ipc.h index 5126faa6..77cf0bc5 100644 --- a/include/corosync/coroipc_ipc.h +++ b/include/corosync/coroipc_ipc.h @@ -84,10 +84,10 @@ enum res_init_types { typedef struct { int service __attribute__((aligned(8))); unsigned long long semkey __attribute__((aligned(8))); - char control_file[64] __attribute__((aligned(8))); - char request_file[64] __attribute__((aligned(8))); - char response_file[64] __attribute__((aligned(8))); - char dispatch_file[64] __attribute__((aligned(8))); + char control_file[PATH_MAX] __attribute__((aligned(8))); + char request_file[PATH_MAX] __attribute__((aligned(8))); + char response_file[PATH_MAX] __attribute__((aligned(8))); + char dispatch_file[PATH_MAX] __attribute__((aligned(8))); size_t control_size __attribute__((aligned(8))); size_t request_size __attribute__((aligned(8))); size_t response_size __attribute__((aligned(8))); diff --git a/lib/coroipcc.c b/lib/coroipcc.c index aab09950..1942cd16 100644 --- a/lib/coroipcc.c +++ b/lib/coroipcc.c @@ -648,10 +648,10 @@ coroipcc_service_connect ( int sys_res; mar_req_setup_t req_setup; mar_res_setup_t res_setup; - char control_map_path[128]; - char request_map_path[128]; - char response_map_path[128]; - char dispatch_map_path[128]; + char control_map_path[PATH_MAX]; + char request_map_path[PATH_MAX]; + char response_map_path[PATH_MAX]; + char dispatch_map_path[PATH_MAX]; res = hdb_error_to_cs (hdb_handle_create (&ipc_hdb, sizeof (struct ipc_instance), handle));