5 Mar
2007
5 Mar
'07
3:28 p.m.
On 05/03/2007 15:24, Michael Kress wrote:
void client_send_line(struct pop3_client *client, const char *line) {
struct const_iovec iov[2];
struct const_iovec iov[1]; ssize_t ret;
iov[0].iov_base = line;
iov[0].iov_len = strlen(line);
iov[1].iov_base = "\r\n";
iov[1].iov_len = 2;
iov[0].iov_base = strcat(line,"\r\n");
Oooh, you can't do that, unless you're sure there's really room for another two characters there, and there's nothing here to say there is. You may accidentally be overwriting something else.
Cheers,
John.