raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ea3d28d0c3fa7dbf286f955b3e0edbb7f01e0d7c
commit ea3d28d0c3fa7dbf286f955b3e0edbb7f01e0d7c Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Mon Sep 1 18:53:49 2014 +0900 embryo_cc - fix possible buffer overrun fix CID 1039587 --- src/bin/embryo/embryo_cc_sc2.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bin/embryo/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c index 2da0656..7f76feb 100644 --- a/src/bin/embryo/embryo_cc_sc2.c +++ b/src/bin/embryo/embryo_cc_sc2.c @@ -1214,10 +1214,16 @@ command(void) char s2[20]; extern char *sc_tokens[]; /* forward declaration */ - if (tok < 256) - sprintf(s2, "%c", (char)tok); - else - strcpy(s2, sc_tokens[tok - tFIRST]); + if (tok < 256) + { + s2[0] = (char)tok; + s2[1] = 0; + } + else + { + strncpy(s2, sc_tokens[tok - tFIRST], 19); + s2[19] = 0; + } error(1, sc_tokens[tSYMBOL - tFIRST], s2); break; } /* case */ --
