diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-04-14 13:49:05 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-04-14 13:49:05 +0000 |
commit | 9f9e5f2221777f956663cfe24459b5f450113198 (patch) | |
tree | f7a501e7226792137b874968bf53401e6d7c9684 | |
parent | 68270ec277050b164a32142179b4b7df08366829 (diff) |
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)
-rw-r--r-- | src/htsback.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |