summaryrefslogtreecommitdiff
path: root/src/io_gunzip.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-25io_gunzip: fix handling short reads near end-of-fileTimo Teräs1-8/+13
The gzip library can drain all of the input to internal buffers and still keep providing data even if avail_in is zero. Previously it was assumed that avail_in != 0 if there is still data expected out, but this logic breaks near end-of-file for multiple short reads. Adjust logic to not process end-of-file event too early. fixes #10809
2021-12-14everywhere: use stdlib.h for malloc(3) definition, not GNU-specific malloc.hAriadne Conill1-1/+0
musl implements support for malloc.h, but it is only a stub. we do not use any of the GNU-specific malloc interfaces, so just use POSIX stdlib.h instead. ref #10794
2021-02-07gunzip: fix false end-of-file condition in rare circumstancesTimo Teräs1-1/+1
It turns out inflate() can output zero bytes, even if it consumed data. This had the unfortunate side effect of returning zero bytes (end-of-file) condition before calling the boundary callbacks. This fixes the logic to not return zero reads on gzip boundary. In practice this fixes the seldom seen issues of apk reporting bad signature (when it was correct).
2021-01-11database: Propagate errors when loading an APKINDEXthibault.ferrante1-2/+4
In case of failure when loading an APKINDEX, no errors are propagated to the user which may uncorrectly interpret the current problem.
2020-10-07various changes to make clang not give warningsTimo Teräs1-0/+1
2020-05-07use SPDX-License-Identifier in source filesTBK1-3/+1
2020-02-14rename all iostream source to io_*.cTimo Teräs1-0/+252