*/
static pop_query_status _pop_query(pop_data_t *pop_data, char *buf, ssize_t buflen)
{
- char *c;
-
if (pop_data->status != POP_CONNECTED)
return PQ_NOT_CONNECTED;
mutt_socket_write(pop_data->conn, buf);
-
- c = strpbrk(buf, " \r\n");
- *c = '\0';
- snprintf(pop_data->err_msg, sizeof(pop_data->err_msg), "%s: ", buf);
+ snprintf(pop_data->err_msg, sizeof(pop_data->err_msg), "%.*s: ",
+ (int)(strpbrk(buf, " \r\n") - buf), buf);
if (mutt_socket_readln(buf, buflen, pop_data->conn) < 0) {
pop_data->status = POP_DISCONNECTED;