ref: 5c84044f5167483515a91239bc0420fe645c6a4e
parent: 03feba8cc1a68da8882bfc90d182365308a00743
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Feb 17 17:16:02 EST 2015
vc: eleminate strcpy in multab code
--- a/sys/src/cmd/vc/mul.c
+++ b/sys/src/cmd/vc/mul.c
@@ -116,8 +116,7 @@
if(g) {
m1 = mulcon0(v);
if(m1) {
- strcpy(m->code, m1->code);
- sprint(strchr(m->code, 0), "%c0", g+'a');
+ snprint(m->code, sizeof m->code, "%s%c0", m1->code, g+'a');
return m;
}
}