rpm2cpio cannot handle files over 4GB, error out cleanly (RhBug:1662481)

This commit is contained in:
Panu Matilainen 2019-01-02 11:36:50 +02:00
parent b50f00f80d
commit 017d0b8846
1 changed files with 5 additions and 0 deletions

View File

@ -75,6 +75,11 @@ int main(int argc, char *argv[])
break;
}
if (headerIsEntry(h, RPMTAG_LONGFILESIZES)) {
fprintf(stderr, _("files over 4GB not supported by cpio, use rpm2archive instead\n"));
exit(EXIT_FAILURE);
}
/* Retrieve payload size and compression type. */
{ const char *compr = headerGetString(h, RPMTAG_PAYLOADCOMPRESSOR);
rpmio_flags = rstrscat(NULL, "r.", compr ? compr : "gzip", NULL);