Skip to content

Commit

Permalink
FIX: Fixed buffer overflow in RL_Word_String()
Browse files Browse the repository at this point in the history
As reported by @meshpoint in PR: rebolsource#4
  • Loading branch information
Oldes committed Mar 13, 2019
1 parent db7b4cf commit cdfe7a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/a-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cdfe7a8

Please sign in to comment.