strcpy(cmd, "MSGS OLD");
}
else if (!strcmp(oper, "do_search")) {
- sprintf(cmd, "MSGS SEARCH|%s", bstr("query"));
+ snprintf(cmd, sizeof(cmd), "MSGS SEARCH|%s", bstr("query"));
}
else {
strcpy(cmd, "MSGS ALL");
if ((WCC->wc_view == VIEW_MAILBOX) && (maxmsgs > 1)) {
is_summary = 1;
if (!strcmp(oper, "do_search")) {
- sprintf(cmd, "MSGS SEARCH|%s", bstr("query"));
+ snprintf(cmd, sizeof(cmd), "MSGS SEARCH|%s", bstr("query"));
}
else {
strcpy(cmd, "MSGS ALL");
if ((WCC->wc_view == VIEW_ADDRESSBOOK) && (maxmsgs > 1)) {
is_addressbook = 1;
if (!strcmp(oper, "do_search")) {
- sprintf(cmd, "MSGS SEARCH|%s", bstr("query"));
+ snprintf(cmd, sizeof(cmd), "MSGS SEARCH|%s", bstr("query"));
}
else {
strcpy(cmd, "MSGS ALL");
}
if (is_summary) { /**< fetch header summary */
- snprintf(cmd, sizeof cmd, "MSGS %s|%s||1",
+ snprintf(cmd, sizeof(cmd), "MSGS %s|%s||1",
(!strcmp(oper, "do_search") ? "SEARCH" : "ALL"),
(!strcmp(oper, "do_search") ? bstr("query") : "")
);