- sprintf(oname, "o%.5d", thread);
- sprintf(ename, "e%.5d", thread);
+ if (o_verbose > 2)
+ printf("%s: running thread #%d\n", cmdname, thread);
+
+ rc = snprintf(oname, sizeof(oname), "o%.5d", thread);
+ if (rc != 1) {
+ rc = -EFAULT;
+ goto out_exit;
+ }
+ rc = snprintf(ename, sizeof(ename), "e%.5d", thread);
+ if (rc != 1) {
+ rc = -EFAULT;
+ goto out_exit;
+ }