aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* xpak: change xpak_process to return start position of XPAKPACKFabian Groffen2020-05-171-5/+9
| | | | | | | Allow to get the size of the archive by a call to xpak_process, or failure if size is -1. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/xpak: fix Coverity 125939 Time of check time of useFabian Groffen2020-01-261-15/+23
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/xpak: fix out of bounds checkingFabian Groffen2019-11-201-5/+6
| | | | | | | Don't check bounds if there is no data retrieved, and make sure we check the bounds on the data length, not index length. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/xpak: perform sanity checks on offset and lenFabian Groffen2019-11-181-0/+8
| | | | | | | As shown by Agostino Sarubbo, the input can be crap, resulting in very bad scenarios. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/xpak: try to seek to XPAKSTART in _xpak_openFabian Groffen2019-11-171-6/+33
| | | | | | | | To make it easier to deal with assembled files (like binpkgs) just embed the offset logic in _xpak_open. This makes qxpak operate directly on tbz2 files, removing the need to split out using qtbz2 first. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/xpak: rework to reuse more codeFabian Groffen2019-11-151-76/+56
| | | | | | | | | | - introduce xpak_process{,_fd} to replace the very similar list and extract - add _fd variant to be able to pass already open filedescriptor - rework interface to carry a context pointer for the callback func for more flexibility - adapt qxpak for the interface changes Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/xpak: fix copy/paste typo causing xpak_extract to always failFabian Groffen2019-11-131-2/+2
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* libq/xpak: turn asserts into real error checksFabian Groffen2019-11-131-10/+13
| | | | | | | Using asserts to validate external data is a bad idea. Turn them into proper errors instead. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* q: fix various issues on Linux systemsFabian Groffen2019-03-271-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* build: compile applets as separate objectsFabian Groffen2019-03-271-0/+369
Instead of including everything from a single file, compile each applet separately. This standardises things somewhat, and allows for parallel compilation. Signed-off-by: Fabian Groffen <grobian@gentoo.org>