W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

[widgets] Zip endian issue?

From: Marcos Caceres <marcosc@opera.com>
Date: Fri, 3 Apr 2009 10:54:20 +0200
Message-ID: <b21a10670904030154u3c9d1faud94f1255686cf210@mail.gmail.com>
To: Web Applications Working Group WG <public-webapps@w3.org>
Cc: "timeless.bmo1@gmail.com" <timeless@gmail.com>
Hi,
I recently chatted with Josh and he pointed out that there might be an
endian issue when checking for magic numbers.
[[
timeless.bmo1@gmail.com:  zip files are guaranteed not to have ENDIAN issues?
If the first four bytes of the potential Zip archive do not match the
magic numbers for a Zip archive (50 4B 03 04)
 me:  ah, good point
 timeless.bmo1@gmail.com:  i.e. could you have 4B500403
or whatever the correct endian corruptions are :)
 me:  All values
 are stored in little-endian byte order unless otherwise specified.
 timeless.bmo1@gmail.com:  yeah, but could the file be entirely
transposed on media
test it.. create a zip file w/a single tiny file and then use some
perl magic to swap each pair of bytes :)
(i'm not awake enough to do that)
 me:  neither am I
]]

Anyone with experience in this area want to propose some text for the
P&C spec to fix this issue.

Kind regards,
Marcos
-- 
Marcos Caceres
http://datadriven.com.au
Received on Friday, 3 April 2009 08:55:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:31 GMT