git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* unpack_sha1_file issues
@ 2005-04-25  2:01 Morten Welinder
  0 siblings, 0 replies; only message in thread
From: Morten Welinder @ 2005-04-25  2:01 UTC (permalink / raw)
  To: GIT Mailing List, Linus Torvalds

unpack_sha1_file is being called by fsck-cache.  Therefore it should
not assume that
a \0 occurs within the first 8192 bytes of the uncompressed data. 
However, currently
both the sscanf and strlen calls do just that.

Also, unpack_sha1_file should call inflateEnd in a couple of the error cases.

Finally, if *size==0, shouldn't unpack_sha1_file allocate a single
byte to prevent
malloc from returning NULL?

Morten

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-25  1:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-25  2:01 unpack_sha1_file issues Morten Welinder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).