Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 232875 Details for
Bug 321439
app-arch/rpm2targz: unable to unpack lzma compressed rpms
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
rpmoffset.c.patch
rpmoffset.c.patch (text/plain), 1017 bytes, created by
Peter Volkov (RETIRED)
on 2010-05-25 11:55:52 UTC
(
hide
)
Description:
rpmoffset.c.patch
Filename:
MIME Type:
Creator:
Peter Volkov (RETIRED)
Created:
2010-05-25 11:55:52 UTC
Size:
1017 bytes
patch
obsolete
>diff --git a/rpmoffset.c b/rpmoffset.c >index 0a3c488..e472f82 100644 >--- a/rpmoffset.c >+++ b/rpmoffset.c >@@ -25,6 +25,14 @@ typedef struct { > const size_t len; > } magic_t; > >+int is_lzma_header(char *buf) { >+ return (buf[0] < 0xE1 >+ && buf[0] == 0x5d >+ && buf[4] < 0x20 >+ && (memcmp (buf + 10 , "\x00\x00\x00", 3) == 0 >+ || (memcmp (buf + 5, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 8) == 0))); >+} >+ > static const unsigned char magic_gzip[] = { '\037', '\213', '\010' }; > static const unsigned char magic_bzip2[] = { 'B', 'Z', 'h' }; > static const unsigned char magic_xz[] = { 0xFD, '7', 'z', 'X', 'Z', 0x00 }; >@@ -76,6 +84,15 @@ int main(int argc, char *argv[]) > return 0; > } > } >+ >+ for (i = 0; i < read_cnt; i++) { >+ if (read_cnt + left > 10 && is_lzma_header(p+i)) { >+ if (show_magic) >+ printf("lzma "); >+ printf("%zu\n", offset+i); >+ return 0; >+ } >+ } > > memmove(p, p + left + read_cnt - MAGIC_SIZE_MIN + 1, MAGIC_SIZE_MIN - 1); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 321439
:
232875
|
241561
|
244145