snprintf(pathname, sizeof pathname,
"./images/floor.%d.gif", which_floor);
} else if (!strcasecmp(filename, "_roompic_")) {
- assoc_file_name(pathname, &CC->quickroom, "images");
+ assoc_file_name(pathname, sizeof pathname, &CC->quickroom, "images");
} else {
for (a = 0; a < strlen(filename); ++a) {
filename[a] = tolower(filename[a]);
}
if ((!strcasecmp(basenm, "_roompic_")) && (is_room_aide())) {
- assoc_file_name(CC->upl_path, &CC->quickroom, "images");
+ assoc_file_name(CC->upl_path, sizeof CC->upl_path, &CC->quickroom, "images");
}
if (strlen(CC->upl_path) == 0) {
}
/* put together an upload notice */
- sprintf(upload_notice,
+ snprintf(upload_notice, sizeof upload_notice,
"NEW UPLOAD: '%s'\n %s\n",
CC->upl_file, CC->upl_comment);
quickie_message(CC->curr_user, NULL, CC->quickroom.QRname,
}
fseek(CC->download_fp, start_pos, 0);
- bytes = fread(buf, bytes, 1, CC->download_fp);
+ fread(buf, bytes, 1, CC->download_fp);
cprintf("%d %d\n", BINARY_FOLLOWS, bytes);
client_write(buf, bytes);
}