chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Fix procedure name in errors on bad string arg


From: Evan Hanson
Subject: [Chicken-hackers] [PATCH] Fix procedure name in errors on bad string arguments to `system`
Date: Wed, 1 Mar 2017 23:05:11 +1300

When `system` is called with a string containing null bytes, the
resulting error should use "system" as its location, not
"get-environment-variables".
---
 runtime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime.c b/runtime.c
index 9ccce654..f6ac6866 100644
--- a/runtime.c
+++ b/runtime.c
@@ -4796,7 +4796,7 @@ C_regparm C_word C_fcall C_execute_shell_command(C_word 
string)
   C_memcpy(buf, C_data_pointer(string), n);
   buf[ n ] = '\0';
   if (n != strlen(buf))
-    barf(C_ASCIIZ_REPRESENTATION_ERROR, "get-environment-variable", string);
+    barf(C_ASCIIZ_REPRESENTATION_ERROR, "system", string);
 
   n = C_system(buf);
 
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]