public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ibacm: define prov_lib_path as a char array
@ 2014-07-02 18:30 kaike.wan-ral2JQCrhuEAvxtiuMwx3w
       [not found] ` <1404325850-918-1-git-send-email-kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: kaike.wan-ral2JQCrhuEAvxtiuMwx3w @ 2014-07-02 18:30 UTC (permalink / raw)
  To: sean.hefty-ral2JQCrhuEAvxtiuMwx3w
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kaike Wan

From: Kaike Wan <kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

This patch fixes a segfault error when the option file defines the provider
lib path. The variable prov_lib_path should be a buffer (char array) instead
of a char pointer. This allows a string to be copied into it during option
parsing.

Signed-off-by: Kaike Wan <kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 src/acm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/acm.c b/src/acm.c
index 8f147ef..fae9d0b 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -193,7 +193,7 @@ static int log_level = 0;
 static char lock_file[128] = "/var/run/ibacm.pid";
 static short server_port = 6125;
 static int support_ips_in_addr_cfg = 0;
-static char *prov_lib_path = IBACM_LIB_PATH;
+static char prov_lib_path[256] = IBACM_LIB_PATH;
 
 void acm_write(int level, const char *format, ...)
 {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-02 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-02 18:30 [PATCH 1/1] ibacm: define prov_lib_path as a char array kaike.wan-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1404325850-918-1-git-send-email-kaike.wan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-07-02 20:22   ` Weiny, Ira
     [not found]     ` <2807E5FD2F6FDA4886F6618EAC48510E04BD17C0-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-07-02 20:25       ` Weiny, Ira
     [not found]         ` <2807E5FD2F6FDA4886F6618EAC48510E04BD180B-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-07-02 20:39           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A8237399324746-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-07-02 20:44               ` Weiny, Ira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox