strcpy(utmp_id, cp);
#else
if (len > 2 && *(cp - 1) != '/')
- sprintf(utmp_id, "k%s", cp - 1);
+ snprintf(utmp_id, sizeof(utmp_id), "k%s", cp - 1);
else
- sprintf(utmp_id, "k0%s", cp);
+ snprintf(utmp_id, sizeof(utmp_id), "k0%s", cp);
#endif
strncpy(utx.ut_id, utmp_id, sizeof(utx.ut_id));
/*
}
else if (argc != 2) {
/* should do something better than this */
- sprintf(buffer, "usage:\n\t%s [topic|command]\nor\t%s\n",
- request_name, request_name);
+ snprintf(buffer, sizeof(buffer),
+ "usage:\n\t%s [topic|command]\nor\t%s\n",
+ request_name, request_name);
ss_perror(sci_idx, 0, buffer);
return;
}