summaryrefslogtreecommitdiff
path: root/src/bin/embryo/embryo_cc_sc3.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 18:31:54 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-09-01 19:40:46 +0900
commit6d694962c651da9c7e2b0a1fb3aa784b3b56ec9d (patch)
treef1d04ba35a7c1aaec8725b322252ad4e8362d456 /src/bin/embryo/embryo_cc_sc3.c
parent3c5412f72879bbce72bfbc7190acd9e5d16d3b46 (diff)
embryo_cc - fix coverity buffer complaint
this isnt an actual problem, but best it never comes around again. fix CID 1039585
Diffstat (limited to 'src/bin/embryo/embryo_cc_sc3.c')
-rw-r--r--src/bin/embryo/embryo_cc_sc3.c6
1 files 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,
170 { 170 {
171 if (oper == op1[i]) 171 if (oper == op1[i])
172 { 172 {
173 strcpy(opername, binoperstr[i]); 173 strncpy(opername, binoperstr[i], sizeof(opername) - 1);
174 opername[sizeof(opername) - 1] = 0;
174 savepri = binoper_savepri[i]; 175 savepri = binoper_savepri[i];
175 break; 176 break;
176 } /* if */ 177 } /* if */
@@ -190,7 +191,8 @@ check_userop(void (*oper) (void), int tag1, int tag2, int numparam,
190 { 191 {
191 if (oper == unopers[i]) 192 if (oper == unopers[i])
192 { 193 {
193 strcpy(opername, unoperstr[i]); 194 strncpy(opername, unoperstr[i], sizeof(opername) - 1);
195 opername[sizeof(opername) - 1] = 0;
194 break; 196 break;
195 } /* if */ 197 } /* if */
196 } /* for */ 198 } /* for */