Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Unified Diff: src/xz/coder.c

Issue 12568011: Update XZ Utils to 5.0.4 (third_party) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« README.chromium ('K') | « src/xz/args.c ('k') | src/xz/list.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/xz/coder.c
===================================================================
--- src/xz/coder.c (revision 87706)
+++ src/xz/coder.c (working copy)
@@ -284,7 +284,10 @@
static bool
is_format_xz(void)
{
- return strm.avail_in >= 6 && memcmp(in_buf.u8, "\3757zXZ", 6) == 0;
+ // Specify the magic as hex to be compatible with EBCDIC systems.
+ static const uint8_t magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
+ return strm.avail_in >= sizeof(magic)
+ && memcmp(in_buf.u8, magic, sizeof(magic)) == 0;
}
« README.chromium ('K') | « src/xz/args.c ('k') | src/xz/list.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698