libpurple/ft.c

branch
release-2.x.y
changeset 35991
e6937e52930b
parent 31754
920c9dad2b48
child 35992
34a67264df99
--- a/libpurple/ft.c	Tue May 06 18:28:56 2014 +0200
+++ b/libpurple/ft.c	Tue May 06 19:38:50 2014 +0200
@@ -1307,7 +1307,12 @@
 			return;
 		}
 
-		fseek(xfer->dest_fp, xfer->bytes_sent, SEEK_SET);
+		if (fseek(xfer->dest_fp, xfer->bytes_sent, SEEK_SET) != 0) {
+			purple_debug_error("xfer", "couldn't seek\n");
+			purple_xfer_show_file_error(xfer, purple_xfer_get_local_filename(xfer));
+			purple_xfer_cancel_local(xfer);
+			return;
+		}
 	}
 
 	if (xfer->fd != -1)

mercurial