{"thread":{"id":"303","subject":"unpack_sha1_file issues","startedAt":"2005-04-25T02:01:38Z","lastAt":"2005-04-25T02:01:38Z","messageCount":1,"participants":["Morten Welinder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"1577","messageId":"118833cc05042419012f425f0d@mail.gmail.com","threadId":"303","inReplyTo":null,"subject":"unpack_sha1_file issues","fromName":"Morten Welinder","fromEmail":"mwelinder@gmail.com","sentAt":"2005-04-25T02:01:38Z","receivedAt":"2005-04-25T02:01:38Z","isPatch":false,"sender":{"key":"mwelinder@gmail.com","avatar":null},"body":"unpack_sha1_file is being called by fsck-cache.  Therefore it should\nnot assume that\na \\0 occurs within the first 8192 bytes of the uncompressed data. \nHowever, currently\nboth the sscanf and strlen calls do just that.\n\nAlso, unpack_sha1_file should call inflateEnd in a couple of the error cases.\n\nFinally, if *size==0, shouldn't unpack_sha1_file allocate a single\nbyte to prevent\nmalloc from returning NULL?\n\nMorten\n"}]}