From 6d694962c651da9c7e2b0a1fb3aa784b3b56ec9d Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 1 Sep 2014 18:31:54 +0900 Subject: [PATCH] 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 d520cd414f..3490c08563 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 */