[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-rewrite.c, 1.76, 1.77

tss at dovecot.org tss at dovecot.org
Sun Mar 11 18:26:35 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv5229

Modified Files:
	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.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- mbox-sync-rewrite.c	10 Mar 2007 16:14:33 -0000	1.76
+++ mbox-sync-rewrite.c	11 Mar 2007 16:26:33 -0000	1.77
@@ -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