<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/http-push.c, branch v1.5.0.7</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.0.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.0.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2007-03-02T08:10:12Z</updated>
<entry>
<title>Another memory overrun in http-push.c</title>
<updated>2007-03-02T08:10:12Z</updated>
<author>
<name>Eygene Ryabinkin</name>
<email>rea-git@codelabs.ru</email>
</author>
<published>2007-03-01T16:09:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=eecc8367f4eaafc8449fc08c4e33f3f8ac474469'/>
<id>urn:sha1:eecc8367f4eaafc8449fc08c4e33f3f8ac474469</id>
<content type='text'>
Use of strlcpy() are wrong, as the source buffer at these
locations may not be NUL-terminated.
</content>
</entry>
<entry>
<title>http-push.c::lock_remote(): validate all remote refs.</title>
<updated>2007-02-28T20:12:02Z</updated>
<author>
<name>Eygene Ryabinkin</name>
<email>rea-git@codelabs.ru</email>
</author>
<published>2007-02-28T20:12:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2c46759db757eb742590e8547cb0c63e8bdb1da1'/>
<id>urn:sha1:2c46759db757eb742590e8547cb0c63e8bdb1da1</id>
<content type='text'>
Starting from offset 11 might have been good back when it was
only used for updating "refs/heads/*", but it is used to update
"info/refs" and "refs/tags/*" as well.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Don't force everybody to call setup_ident().</title>
<updated>2007-01-28T09:58:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-01-28T08:50:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=01754769ab9bf9ff2fe2b12590e7ee2c7c3448ca'/>
<id>urn:sha1:01754769ab9bf9ff2fe2b12590e7ee2c7c3448ca</id>
<content type='text'>
Back when only handful commands that created commit and tag were
the only users of committer identity information, it made sense
to explicitly call setup_ident() to pre-fill the default value
from the gecos information.  But it is much simpler for programs
to make the call automatic when get_ident() is called these days,
since many more programs want to use the information when updating
the reflog.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Don't die in git-http-fetch when fetching packs.</title>
<updated>2007-01-10T01:54:25Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2007-01-10T01:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1c23d794bfa3b9f3e03b18bb7e542615a924dbe3'/>
<id>urn:sha1:1c23d794bfa3b9f3e03b18bb7e542615a924dbe3</id>
<content type='text'>
My sp/mmap changes to pack-check.c modified the function such that
it expects packed_git.pack_size to be populated with the total
bytecount of the packfile by the caller.

But that isn't the case for packs obtained by git-http-fetch as
pack_size was not initialized before being accessed.  This caused
verify_pack to think it had 2^32-21 bytes available when the
downloaded pack perhaps was only 305 bytes in length.  The use_pack
function then later dies with "offset beyond end of packfile"
when computing the overall file checksum.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>short i/o: fix calls to write to use xwrite or write_in_full</title>
<updated>2007-01-08T23:44:47Z</updated>
<author>
<name>Andy Whitcroft</name>
<email>apw@shadowen.org</email>
</author>
<published>2007-01-08T15:58:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=93822c2239a336e5cb583549071c59202ef6c5b2'/>
<id>urn:sha1:93822c2239a336e5cb583549071c59202ef6c5b2</id>
<content type='text'>
We have a number of badly checked write() calls.  Often we are
expecting write() to write exactly the size we requested or fail,
this fails to handle interrupts or short writes.  Switch to using
the new write_in_full().  Otherwise we at a minimum need to check
for EINTR and EAGAIN, where this is appropriate use xwrite().

Note, the changes to config handling are much larger and handled
in the next patch in the sequence.

Signed-off-by: Andy Whitcroft &lt;apw@shadowen.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>short i/o: fix calls to read to use xread or read_in_full</title>
<updated>2007-01-08T23:44:47Z</updated>
<author>
<name>Andy Whitcroft</name>
<email>apw@shadowen.org</email>
</author>
<published>2007-01-08T15:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=93d26e4cb9cec2eb8abb4f37e6dda2c86fcceeac'/>
<id>urn:sha1:93d26e4cb9cec2eb8abb4f37e6dda2c86fcceeac</id>
<content type='text'>
We have a number of badly checked read() calls.  Often we are
expecting read() to read exactly the size we requested or fail, this
fails to handle interrupts or short reads.  Add a read_in_full()
providing those semantics.  Otherwise we at a minimum need to check
for EINTR and EAGAIN, where this is appropriate use xread().

Signed-off-by: Andy Whitcroft &lt;apw@shadowen.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Tell between packed, unpacked and symbolic refs.</title>
<updated>2006-09-21T05:02:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-09-21T05:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8da197755450d4f16018bd4b5486dc8ed88b0f2a'/>
<id>urn:sha1:8da197755450d4f16018bd4b5486dc8ed88b0f2a</id>
<content type='text'>
This adds a "int *flag" parameter to resolve_ref() and makes
for_each_ref() family to call callback function with an extra
"int flag" parameter.  They are used to give two bits of
information (REF_ISSYMREF and REF_ISPACKED) about the ref.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Add callback data to for_each_ref() family.</title>
<updated>2006-09-21T04:47:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-09-21T04:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=cb5d709ff8a4bae19d57a470ba2b137c25938a44'/>
<id>urn:sha1:cb5d709ff8a4bae19d57a470ba2b137c25938a44</id>
<content type='text'>
This is a long overdue fix to the API for for_each_ref() family
of functions.  It allows the callers to specify a callback data
pointer, so that the caller does not have to use static
variables to communicate with the callback funciton.

The updated for_each_ref() family takes a function of type

	int (*fn)(const char *, const unsigned char *, void *)

and a void pointer as parameters, and calls the function with
the name of the ref and its SHA-1 with the caller-supplied void
pointer as parameters.

The commit updates two callers, builtin-name-rev.c and
builtin-pack-refs.c as an example.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Replace uses of strdup with xstrdup.</title>
<updated>2006-09-02T10:24:37Z</updated>
<author>
<name>Shawn Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2006-09-02T04:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9befac470b4cfad529032dbcffcb71242ec71f91'/>
<id>urn:sha1:9befac470b4cfad529032dbcffcb71242ec71f91</id>
<content type='text'>
Like xmalloc and xrealloc xstrdup dies with a useful message if
the native strdup() implementation returns NULL rather than a
valid pointer.

I just tried to use xstrdup in new code and found it to be missing.
However I expected it to be present as xmalloc and xrealloc are
already commonly used throughout the code.

[jc: removed the part that deals with last_XXX, which I am
 finding more and more dubious these days.]

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>free(NULL) is perfectly valid.</title>
<updated>2006-08-28T04:19:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-08-28T04:19:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4cac42b1324951579036a9d3ac403f5c2c3eeed8'/>
<id>urn:sha1:4cac42b1324951579036a9d3ac403f5c2c3eeed8</id>
<content type='text'>
Jonas noticed some places say "if (X) free(X)" which is totally
unnecessary.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
