From 1bf0af6284aca47a6b3a823c4dd682e8fb8d4135 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 15 Feb 2011 16:49:31 +0100 Subject: Fix bad string copy during initialization This may have caused the core dump on ubuntu-64 which have happend for some people. --- lib/wx/c_src/wxe_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/wx/c_src') diff --git a/lib/wx/c_src/wxe_driver.c b/lib/wx/c_src/wxe_driver.c index 14a9d1e982..2404b13cc3 100644 --- a/lib/wx/c_src/wxe_driver.c +++ b/lib/wx/c_src/wxe_driver.c @@ -117,8 +117,7 @@ wxe_driver_start(ErlDrvPort port, char *buff) if(WXE_DRV_PORT == 0) { for(; *buff != 32; buff++); buff++; - erl_wx_privdir = malloc(strlen(buff)); - strcpy(erl_wx_privdir, buff); + erl_wx_privdir = strdup(buff); WXE_DRV_PORT = port; wxe_master = data; -- cgit v1.2.3