aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src/wxe_driver.c
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-02-15 16:49:31 +0100
committerDan Gudmundsson <[email protected]>2011-03-02 11:22:30 +0100
commit1bf0af6284aca47a6b3a823c4dd682e8fb8d4135 (patch)
treea410271358f5fc357e0e4b1053893e9f915f35ca /lib/wx/c_src/wxe_driver.c
parentd0fd9b48bdfccd228fe659ed95de096c79db46eb (diff)
downloadotp-1bf0af6284aca47a6b3a823c4dd682e8fb8d4135.tar.gz
otp-1bf0af6284aca47a6b3a823c4dd682e8fb8d4135.tar.bz2
otp-1bf0af6284aca47a6b3a823c4dd682e8fb8d4135.zip
Fix bad string copy during initialization
This may have caused the core dump on ubuntu-64 which have happend for some people.
Diffstat (limited to 'lib/wx/c_src/wxe_driver.c')
-rw-r--r--lib/wx/c_src/wxe_driver.c3
1 files changed, 1 insertions, 2 deletions
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;