raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6d694962c651da9c7e2b0a1fb3aa784b3b56ec9d

commit 6d694962c651da9c7e2b0a1fb3aa784b3b56ec9d
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Sep 1 18:31:54 2014 +0900

    embryo_cc - fix coverity buffer complaint
    
    this isnt an actual problem, but best it never comes around again. fix
    CID 1039585
---
 src/bin/embryo/embryo_cc_sc3.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/embryo/embryo_cc_sc3.c b/src/bin/embryo/embryo_cc_sc3.c
index d520cd4..3490c08 100644
--- a/src/bin/embryo/embryo_cc_sc3.c
+++ b/src/bin/embryo/embryo_cc_sc3.c
@@ -170,7 +170,8 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int 
numparam,
               {
                  if (oper == op1[i])
                    {
-                      strcpy(opername, binoperstr[i]);
+                      strncpy(opername, binoperstr[i], sizeof(opername) - 1);
+                       opername[sizeof(opername) - 1] = 0;
                       savepri = binoper_savepri[i];
                       break;
                    }           /* if */
@@ -190,7 +191,8 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int 
numparam,
               {
                  if (oper == unopers[i])
                    {
-                      strcpy(opername, unoperstr[i]);
+                      strncpy(opername, unoperstr[i], sizeof(opername) - 1);
+                       opername[sizeof(opername) - 1] = 0;
                       break;
                    }           /* if */
               }                /* for */

-- 


Reply via email to