Rebase the zlib sources to the 1.2.12 release

This commit is contained in:
Nick Clifton
2022-04-12 16:24:10 +01:00
parent 63e0ee15a3
commit 8e6b353660
82 changed files with 12518 additions and 1982 deletions

View File

@@ -1,8 +1,8 @@
/*
* gzlog.c
* Copyright (C) 2004, 2008, 2012, 2016 Mark Adler, all rights reserved
* Copyright (C) 2004, 2008, 2012, 2016, 2019 Mark Adler, all rights reserved
* For conditions of distribution and use, see copyright notice in gzlog.h
* version 2.2, 14 Aug 2012
* version 2.3, 25 May 2019
*/
/*
@@ -756,12 +756,14 @@ local int log_recover(struct log *log, int op)
return -2;
}
if ((fd = open(log->path, O_RDONLY, 0)) < 0) {
free(data);
log_log(log, op, ".add file read failure");
return -1;
}
ret = (size_t)read(fd, data, len) != len;
close(fd);
if (ret) {
free(data);
log_log(log, op, ".add file read failure");
return -1;
}