[erlang-bugs] zlib binary fails to round trip
Paul Mineiro
paul-trapexit@REDACTED
Tue Jan 22 23:55:55 CET 2008
Interestingly enough, removing either the first or last character from this binary eliminates the problem.
Cheers,
-- p
-------
37> zlib:unzip (zlib:zip (<<"<?xml version=\"1.0\"?><Tags><DistinctTags>27</DistinctTags><DistinctItems>1</DistinctItems><DistinctUsers>48</DistinctUsers><TotalUsages>80</TotalUsages><FirstTagging><Name>battery</Name><EntityId>B000B6MLSC</EntityId><UserId>A2NNNAUZZIIVC6</UserId><Time>2005-11-29 14:36:26</Time></FirstTagging><LastTagging><Name>xbox 360 accessory</Name><EntityId>B000B6MLSC</EntityId><UserId>A3R2YUWPTEGASY</UserId><Time>2008-01-18 17:17:45</Time></LastTagging><Tag><Name>xbox 360</Name><TagType>Items</TagType><DistinctItems>1</DistinctItems><DistinctUsers>24</DistinctUsers><TotalUsages>24</TotalUsages><FirstTagging><EntityId>B000B6MLSC</EntityId><UserId>A3L6JBR3XAO9L5</UserId><Time>2006-08-29 17:32:38</Time></FirstTagging><LastTagging><EntityId>B000B6MLSC</EntityId><UserId>A3R2YUWPTEGASY</UserId><Time>2008-01-18 17:17:25</Time></LastTagging></Tag><Tag><Name>battery pack</Name><TagType>Items</TagType><DistinctItems>1</DistinctItems><DistinctUsers>13</DistinctUsers><TotalUsages>13</TotalUsages><FirstTagging><EntityId>B000B6MLSC</EntityId><UserId>A2XQT4U37YFO40</UserId><Time>2005-12-29 20:10:36</Time></FirstTagging><LastTagging><EntityId>B000B6MLSC</EntityId><UserId>A19EPX5X6LRPPB</UserId><Time>2007-12-28 16:38:36</Time></LastTagging></Tag><Tag><Name>xbox 360 accessory</Name><TagType>Items</TagType><DistinctItems>1</DistinctItems><DistinctUsers>9</DistinctUsers><TotalUsages>9</TotalUsages><FirstTagging><EntityId>B000B6MLSC</EntityId><UserId>A37IUBFAP495XQ</UserId><Time>2007-01-21 14:38:12</Time></FirstTagging><LastTagging><EntityId>B000B6MLSC</EntityId><UserId>A3R2YUWPTEGASY</UserId><Time>2008-01-18 17:17:45</Time></LastTagging></Tag><Tag><Name>battery</Name><TagType>Items</TagType><DistinctItems>1</DistinctItems><DistinctUsers>5</DistinctUsers><TotalUsages>5</TotalUsages><FirstTagging><EntityId>B000B6MLSC</EntityId><UserId>A2NNNAUZZIIVC6</UserId><Time>2005-11-29 14:36:26</Time></FirstTagging><LastTagging><EntityId>B000B6MLSC</EntityId><UserId>A3R2CSI4NSJCCV</UserId><Time>2007-08-05 22:22:28</Time></LastTagging></Tag><Tag><Name>rechargeable battery</Name><TagType>Items</TagType><DistinctItems>1</DistinctItems><DistinctUsers>4</DistinctUsers><TotalUsages>4</TotalUsages><FirstTagging><EntityId>B000B6MLSC</EntityId><UserId>A368EJ0XEL1PRV</UserId><Time>2006-12-05 20:15:58</Time></FirstTagging><LastTagging><EntityId>B000B6MLSC</EntityId><UserId>A3R2YUWPTEGASY</UserId><Time>2008-01-18 17:17:19</Time></LastTagging></Tag></Tags>">>)).
=ERROR REPORT==== 22-Jan-2008::14:53:52 ===
Error in process <0.196.0> with exit value: {data_error,[{zlib,call,3},{zlib,unzip,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}
** exited: {data_error,[{zlib,call,3},
{zlib,unzip,1},
{erl_eval,do_apply,5},
{shell,exprs,6},
{shell,eval_loop,3}]} **
38> zlib:module_info ().
[{exports,[{open,0},
{close,1},
{deflateInit,1},
{deflateInit,2},
{deflateInit,6},
{deflateSetDictionary,2},
{deflateReset,1},
{deflateParams,3},
{deflate,2},
{deflate,3},
{deflateEnd,1},
{inflateInit,1},
{inflateInit,2},
{inflateSetDictionary,2},
{inflateSync,1},
{inflateReset,1},
{inflate,2},
{inflateEnd,1},
{setBufSize,2},
{getBufSize,1},
{crc32,1},
{crc32,2},
{crc32,3},
{adler32,2},
{adler32|...},
{...}|...]},
{imports,[]},
{attributes,[{vsn,[235850242155034454638676172994528236350]}]},
{compile,[{options,[{cwd,"/build/buildd/erlang-11.b.2/lib/kernel/src"},
{outdir,"/build/buildd/erlang-11.b.2/lib/kernel/src/../ebin"},
{i,"/build/buildd/erlang-11.b.2/lib/kernel/src/../include"},
debug_info]},
{version,"4.4.2"},
{time,{2007,1,23,12,4,54}},
{source,"/build/buildd/erlang-11.b.2/lib/kernel/src/zlib.erl"}]}]
--------
Optimism is an essential ingredient of innovation. How else can the
individual favor change over security?
-- Robert Noyce
More information about the erlang-bugs
mailing list