>From 8bea6385b0ff9f1bdcb77845ecc3643e5f9d0214 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Thu, 6 Feb 2014 10:00:17 +0100 Subject: [PATCH 2/2] Fix strlcat usage in setenv: use the start of the string as dest buffer. --- posix-common.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posix-common.scm b/posix-common.scm index 3911b07..20b009b 100644 --- a/posix-common.scm +++ b/posix-common.scm @@ -115,7 +115,7 @@ static C_word C_fcall C_setenv(C_word x, C_word y) { else { C_strlcpy(buf, sx, buf_len); buf[ n1 ] = '='; - C_strlcat(buf + n1 + 1, sy, buf_len); + C_strlcat(buf, sy, buf_len); return(C_fix(putenv(buf))); } } -- 1.8.2.3