From 9f9e5f2221777f956663cfe24459b5f450113198 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sun, 14 Apr 2013 13:49:05 +0000 Subject: Fixed file descriptor resurrection inside back_unserialize() leading to close randomly files or sockets This really annoying bug may be the root cause of various related issues while updating of continuing a mirror: * zip_zipWriteInFileInZip_failed assertion failures * random garbage in downloaded files * random "bogus state" error messages * connection unexpectedly closed Probably closes issue 5 (http://code.google.com/p/httrack/issues/detail?id=5) --- src/htsback.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/htsback.c b/src/htsback.c index 4276b9b..87df61e 100644 --- a/src/htsback.c +++ b/src/htsback.c @@ -906,6 +906,7 @@ int back_unserialize(FILE *fp, lien_back** dst) { (*dst)->r.out = NULL; (*dst)->r.location = (*dst)->location_buffer; (*dst)->r.fp = NULL; + (*dst)->r.soc = INVALID_SOCKET; #if HTS_USEOPENSSL (*dst)->r.ssl_con = NULL; #endif -- cgit v1.2.3