[dovecot-cvs] dovecot/src/pop3 commands.c,1.24,1.25
cras at dovecot.org
cras at dovecot.org
Tue Aug 31 11:17:11 EEST 2004
Update of /home/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv23613
Modified Files:
commands.c
Log Message:
fixed potential crash
Index: commands.c
===================================================================
RCS file: /home/cvs/dovecot/src/pop3/commands.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- commands.c 29 Aug 2004 07:52:03 -0000 1.24
+++ commands.c 31 Aug 2004 08:17:08 -0000 1.25
@@ -296,10 +296,12 @@
}
}
- if (o_stream_send(client->output, data, i) < 0)
- break;
- ctx->last = data[i-1];
- i_stream_skip(ctx->stream, i);
+ if (i > 0) {
+ if (o_stream_send(client->output, data, i) < 0)
+ break;
+ ctx->last = data[i-1];
+ i_stream_skip(ctx->stream, i);
+ }
if (o_stream_get_buffer_used_size(client->output) > 0) {
/* continue later */
More information about the dovecot-cvs
mailing list