sprintf(lbuf[1], fmt, unh);
} else {
fmt = user_find_message(user, "HSMSG_REQ_NO_UNHANDLED");
- sprintf(lbuf[1], fmt);
+ sprintf(lbuf[1], "%s", fmt);
}
switch (hs->persist_types[PERSIST_T_REQUEST]) {
case PERSIST_PART:
break;
case PERSIST_QUIT:
fmt = user_find_message(user, "HSMSG_REQ_PERSIST_QUIT");
- sprintf(lbuf[2], fmt);
+ sprintf(lbuf[2], "%s", fmt);
break;
default:
log_module(HS_LOG, LOG_ERROR, "%s has an invalid req_persist.", hs->helpserv->nick);
case PERSIST_CLOSE:
if (user->handle_info) {
fmt = user_find_message(user, "HSMSG_REQ_PERSIST_HANDLE");
- sprintf(lbuf[2], fmt);
} else {
fmt = user_find_message(user, "HSMSG_REQ_PERSIST_QUIT");
- sprintf(lbuf[2], fmt);
}
+ sprintf(lbuf[2], "%s", fmt);
break;
}
helpserv_message(hs, user, MSGTYPE_REQ_OPENED);
continue;
} else if (isdigit(argv[arg][1])) {
char *end_num;
+ unsigned long arg;
- strtoul(argv[arg]+1, &end_num, 10);
+ arg = strtoul(argv[arg]+1, &end_num, 10);
switch (end_num[0]) {
case 0:
continue;
log_module(NS_LOG, LOG_ERROR, "Unable to open dictionary file %s: %s", fname, strerror(errno));
return;
}
- while (!feof(file)) {
- fgets(line, sizeof(line), file);
+ while (fgets(line, sizeof(line), file)) {
if (!line[0])
continue;
if (line[strlen(line)-1] == '\n')