From cdfe7a869bb824133575d6f30e752c5d5ccfc62b Mon Sep 17 00:00:00 2001 From: Oldes Date: Wed, 13 Mar 2019 18:58:42 +0100 Subject: [PATCH] FIX: Fixed buffer overflow in RL_Word_String() As reported by @meshpoint in PR: https://github.com/rebolsource/r3/pull/4 --- src/core/a-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/a-lib.c b/src/core/a-lib.c index 8b288ba1c8..3c0a9aaaa3 100644 --- a/src/core/a-lib.c +++ b/src/core/a-lib.c @@ -756,7 +756,7 @@ RL_API REBYTE *RL_Word_String(u32 word) { REBYTE *s1, *s2; s1 = Get_Sym_Name(word); - s2 = OS_MAKE(strlen(cs_cast(s1))); + s2 = OS_MAKE(strlen(cs_cast(s1)) + 1); strcpy(s_cast(s2), cs_cast(s1)); return s2; }