<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/daemon.c, branch v2.36.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.36.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.36.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-01-05T22:01:31Z</updated>
<entry>
<title>Merge branch 'rs/daemon-plug-leak'</title>
<updated>2022-01-05T22:01:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-01-05T22:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9afe4d9f6bccec15e7ae9d4e8ba5f700e86e08a7'/>
<id>urn:sha1:9afe4d9f6bccec15e7ae9d4e8ba5f700e86e08a7</id>
<content type='text'>
Plug a memory leak.

* rs/daemon-plug-leak:
  daemon: plug memory leak on overlong path
</content>
</entry>
<entry>
<title>daemon: plug memory leak on overlong path</title>
<updated>2021-12-20T20:43:18Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-12-18T09:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=999bba3e0bbb2e81a3e1b2bdb5846479d1e663ad'/>
<id>urn:sha1:999bba3e0bbb2e81a3e1b2bdb5846479d1e663ad</id>
<content type='text'>
Release the strbuf containing the interpolated path after copying it to
a stack buffer and before erroring out if it's too long.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command API users: use strvec_push(), not argv construction</title>
<updated>2021-11-26T06:15:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-11-25T22:52:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f14609e296d5737f34607d4c3e40bb1b063ef04'/>
<id>urn:sha1:7f14609e296d5737f34607d4c3e40bb1b063ef04</id>
<content type='text'>
Change a pattern of hardcoding an "argv" array size, populating it and
assigning to the "argv" member of "struct child_process" to instead
use "strvec_push()" to add data to the "args" member.

As noted in the preceding commit this moves us further towards being
able to remove the "argv" member in a subsequent commit

These callers could have used strvec_pushl(), but moving to
strvec_push() makes the diff easier to read, and keeps the arguments
aligned as before.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command API users: use strvec_pushv(), not argv assignment</title>
<updated>2021-11-26T06:15:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-11-25T22:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6def0ff8785eb12ccc24ceebea04355e13ae24b6'/>
<id>urn:sha1:6def0ff8785eb12ccc24ceebea04355e13ae24b6</id>
<content type='text'>
Migrate those run-command API users that assign directly to the "argv"
member to use a strvec_pushv() of "args" instead.

In these cases it did not make sense to further refactor these
callers, e.g. daemon.c could be made to construct the arguments closer
to handle(), but that would require moving the construction from its
cmd_main() and pass "argv" through two intermediate functions.

It would be possible for a change like this to introduce a regression
if we were doing:

      cp.argv = argv;
      argv[1] = "foo";

And changed the code, as is being done here, to:

      strvec_pushv(&amp;cp.args, argv);
      argv[1] = "foo";

But as viewing this change with the "-W" flag reveals none of these
functions modify variable that's being pushed afterwards in a way that
would introduce such a logic error.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/pkt-line-cleanup'</title>
<updated>2021-10-25T23:07:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-25T23:07:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06355d72dc610ec3806cda328ec9b347a5daed5b'/>
<id>urn:sha1:06355d72dc610ec3806cda328ec9b347a5daed5b</id>
<content type='text'>
Code clean-up.

* ab/pkt-line-cleanup:
  pkt-line.[ch]: remove unused packet_read_line_buf()
  pkt-line.[ch]: remove unused packet_buf_write_len()
</content>
</entry>
<entry>
<title>pkt-line.[ch]: remove unused packet_read_line_buf()</title>
<updated>2021-10-15T20:09:40Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-14T20:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ec9a37d69b4b327c08668bb897f27f25276a5b1c'/>
<id>urn:sha1:ec9a37d69b4b327c08668bb897f27f25276a5b1c</id>
<content type='text'>
This function was added in 4981fe750b1 (pkt-line: share
buffer/descriptor reading implementation, 2013-02-23), but in
01f9ec64c8a (Use packet_reader instead of packet_read_line,
2018-12-29) the code that was using it was removed.

Since it's being removed we can in turn remove the "src" and "src_len"
arguments to packet_read(), all the remaining users just passed a
NULL/NULL pair to it.

That function is only a thin wrapper for packet_read_with_status()
which still needs those arguments, but for the thin packet_read()
convenience wrapper we can do away with it for now.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>daemon.c: refactor hostinfo_init() to HOSTINFO_INIT macro</title>
<updated>2021-09-27T22:02:32Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-09-27T12:58:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e54a32468e209aa724b37496fcc63f4ebe84f60'/>
<id>urn:sha1:6e54a32468e209aa724b37496fcc63f4ebe84f60</id>
<content type='text'>
Remove the hostinfo_init() function added in 01cec54e135 (daemon:
deglobalize hostname information, 2015-03-07) and instead initialize
the "struct hostinfo" with a macro.

This is the more idiomatic pattern in the codebase, and doesn't leave
us wondering when we see the *_init() function if this struct needs
more complex initialization than a macro can provide.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/daemon-sanitize-dir-sep'</title>
<updated>2021-04-08T20:23:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-08T20:23:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bde35a2a9334b27451d2cd7b175f9cafa7e68598'/>
<id>urn:sha1:bde35a2a9334b27451d2cd7b175f9cafa7e68598</id>
<content type='text'>
"git daemon" has been tightened against systems that take backslash
as directory separator.

* rs/daemon-sanitize-dir-sep:
  daemon: sanitize all directory separators
</content>
</entry>
<entry>
<title>daemon: sanitize all directory separators</title>
<updated>2021-03-27T05:00:12Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-03-25T16:21:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a7f1ce8b78dae09cf4510a98bd6b81d0d478772'/>
<id>urn:sha1:9a7f1ce8b78dae09cf4510a98bd6b81d0d478772</id>
<content type='text'>
When sanitizing client-supplied strings on Windows, also strip off
backslashes, not just slashes.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use CALLOC_ARRAY</title>
<updated>2021-03-14T00:00:09Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-03-13T16:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ca56dadb4b65ccaeab809d80db80a312dc00941a'/>
<id>urn:sha1:ca56dadb4b65ccaeab809d80db80a312dc00941a</id>
<content type='text'>
Add and apply a semantic patch for converting code that open-codes
CALLOC_ARRAY to use it instead.  It shortens the code and infers the
element size automatically.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
