[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-rewrite.c, 1.62.2.13, 1.62.2.14
tss at dovecot.org
tss at dovecot.org
Sun Mar 11 18:26:32 EET 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv5233
Modified Files:
Tag: branch_1_0
mbox-sync-rewrite.c
Log Message:
o_stream_seek() call was missing error handling.
Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.62.2.13
retrieving revision 1.62.2.14
diff -u -d -r1.62.2.13 -r1.62.2.14
--- mbox-sync-rewrite.c 10 Mar 2007 16:14:31 -0000 1.62.2.13
+++ mbox-sync-rewrite.c 11 Mar 2007 16:26:30 -0000 1.62.2.14
@@ -29,7 +29,12 @@
output = o_stream_create_file(sync_ctx->write_fd, default_pool,
4096, FALSE);
i_stream_seek(sync_ctx->file_input, source);
- o_stream_seek(output, dest);
+ if (o_stream_seek(output, dest) < 0) {
+ mbox_set_syscall_error(sync_ctx->mbox,
+ "o_stream_seek()");
+ o_stream_unref(&output);
+ return -1;
+ }
input = i_stream_create_limit(default_pool, sync_ctx->file_input,
source, size);
More information about the dovecot-cvs
mailing list