diff options
author | Fabian Groffen <grobian@gentoo.org> | 2018-03-11 21:07:05 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2018-03-11 21:07:17 +0100 |
commit | a7702363a854ef306b3ad6e0566697a6c7e7c741 (patch) | |
tree | a276929e0e2a93f54146a6bab2f678ebf17f25dc /app-arch/xar/files | |
parent | app-portage/gemato: Clean old up (diff) | |
download | gentoo-a7702363a854ef306b3ad6e0566697a6c7e7c741.tar.gz gentoo-a7702363a854ef306b3ad6e0566697a6c7e7c741.tar.bz2 gentoo-a7702363a854ef306b3ad6e0566697a6c7e7c741.zip |
app-arch/xar: fix arm and ppc64, bug #650024
Due to a different signedness of char type on arm and ppc, xar wouldn't
start at all on these platforms. A weird (compiler?) bug caused a
completely random offset to be taken obviously failing any checksums.
Fixes: https://bugs.gentoo.org/650024
Closes: https://bugs.gentoo.org/650024
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'app-arch/xar/files')
-rw-r--r-- | app-arch/xar/files/xar-1.8-arm-ppc.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app-arch/xar/files/xar-1.8-arm-ppc.patch b/app-arch/xar/files/xar-1.8-arm-ppc.patch new file mode 100644 index 000000000000..b2eec5a96e81 --- /dev/null +++ b/app-arch/xar/files/xar-1.8-arm-ppc.patch @@ -0,0 +1,23 @@ +--- a/lib/archive.c ++++ b/lib/archive.c +@@ -387,7 +387,8 @@ + return NULL; + } + +- XAR(ret)->heap_offset = xar_get_heap_offset(ret) + offset; ++ XAR(ret)->heap_offset = ++ XAR(ret)->toc_count + sizeof(xar_header_t) + offset; + if( lseek(XAR(ret)->fd, XAR(ret)->heap_offset, SEEK_SET) == -1 ) { + xar_close(ret); + return NULL; +--- a/src/xar.c ++++ a/src/xar.c +@@ -783,7 +783,7 @@ + int main(int argc, char *argv[]) { + int ret; + char *filename = NULL; +- char command = 0, c; ++ signed char command = 0, c; + char **args; + const char *tocfile = NULL; + int arglen, i, err; |