<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/mailinfo.c, branch ce/https-public-key-pinning</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>mailinfo: fix passing wrong address to git_mailinfo_config</title>
<updated>2015-11-01T18:29:40+00:00</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-11-01T14:30:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=85d9d9ddf38aba0c13a1be8f667af6b8cf021ca6'/>
<id>85d9d9ddf38aba0c13a1be8f667af6b8cf021ca6</id>
<content type='text'>
git_mailinfo_config() expects "struct mailinfo *". But in
setup_mailinfo(), "mi" is already "struct mailinfo *". &amp;mi would make
it "struct mailinfo **" and git_mailinfo_config() would damage some
other memory when it assigns some value to mi-&gt;use_scissors.

This is caught by t4150.20. git_mailinfo_config() breaks
mi-&gt;name.alloc and makes strbuf_release() in clear_mailinfo() attempt
to free strbuf_slopbuf.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git_mailinfo_config() expects "struct mailinfo *". But in
setup_mailinfo(), "mi" is already "struct mailinfo *". &amp;mi would make
it "struct mailinfo **" and git_mailinfo_config() would damage some
other memory when it assigns some value to mi-&gt;use_scissors.

This is caught by t4150.20. git_mailinfo_config() breaks
mi-&gt;name.alloc and makes strbuf_release() in clear_mailinfo() attempt
to free strbuf_slopbuf.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mailinfo: remove calls to exit() and die() deep in the callchain</title>
<updated>2015-10-21T22:59:34+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-15T00:45:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=6ac617a321383b2e3a0f0537e3224ec6229e6500'/>
<id>6ac617a321383b2e3a0f0537e3224ec6229e6500</id>
<content type='text'>
The top-level mailinfo() would instead punt when the code in the
deeper part of the callchain detects an unrecoverable error in the
input.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The top-level mailinfo() would instead punt when the code in the
deeper part of the callchain detects an unrecoverable error in the
input.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mailinfo: handle charset conversion errors in the caller</title>
<updated>2015-10-21T22:59:34+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-15T00:45:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=669b963af2778c489b0742d2f4d56aeda7dcfad8'/>
<id>669b963af2778c489b0742d2f4d56aeda7dcfad8</id>
<content type='text'>
Instead of dying in convert_to_utf8(), just report an error and let
the callers handle it.  Between the two callers:

 - decode_header() silently punts when it cannot parse a broken
   RFC2047 encoded text (e.g. when it sees anything other than B or
   Q after it sees "=?&lt;charset&gt;") by jumping to release_return,
   returning the string it successfully parsed out so far, to the
   caller.  A piece of string that convert_to_utf8() cannot handle
   can be treated the same way.

 - handle_commit_msg() doesn't cope with a malformed line well, so
   die there for now.  We'll lift this even higher in later changes
   in this series.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of dying in convert_to_utf8(), just report an error and let
the callers handle it.  Between the two callers:

 - decode_header() silently punts when it cannot parse a broken
   RFC2047 encoded text (e.g. when it sees anything other than B or
   Q after it sees "=?&lt;charset&gt;") by jumping to release_return,
   returning the string it successfully parsed out so far, to the
   caller.  A piece of string that convert_to_utf8() cannot handle
   can be treated the same way.

 - handle_commit_msg() doesn't cope with a malformed line well, so
   die there for now.  We'll lift this even higher in later changes
   in this series.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mailinfo: libify</title>
<updated>2015-10-21T22:59:34+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-15T00:44:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=c6905e45f078530cda57690b0db6a7378dc1f794'/>
<id>c6905e45f078530cda57690b0db6a7378dc1f794</id>
<content type='text'>
Move the bulk of the code from builtin/mailinfo.c to mailinfo.c
so that new callers can start calling mailinfo() directly.

Note that a few calls to exit() and die() need to be cleaned up
for the API to be truly useful, which will come in later steps.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the bulk of the code from builtin/mailinfo.c to mailinfo.c
so that new callers can start calling mailinfo() directly.

Note that a few calls to exit() and die() need to be cleaned up
for the API to be truly useful, which will come in later steps.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make git-mailinfo a builtin</title>
<updated>2006-06-19T05:10:28+00:00</updated>
<author>
<name>Lukas Sandström</name>
<email>lukass@etek.chalmers.se</email>
</author>
<published>2006-06-13T20:21:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=34488e3c375d159506d5d98e012f3b36e7cd9fe7'/>
<id>34488e3c375d159506d5d98e012f3b36e7cd9fe7</id>
<content type='text'>
[jc: with a bit of constness tightening]

Signed-off-by: Lukas Sandström &lt;lukass@etek.chalmers.se&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[jc: with a bit of constness tightening]

Signed-off-by: Lukas Sandström &lt;lukass@etek.chalmers.se&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mailinfo: ignore blanks after in-body headers.</title>
<updated>2006-06-18T00:05:36+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-06-17T23:58:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=ae448e3854d8b6e7e37aa88fa3917f5dd97f3210'/>
<id>ae448e3854d8b6e7e37aa88fa3917f5dd97f3210</id>
<content type='text'>
[jc: this is based on Eric's patch but also fixes up the parsed
 subject headers].

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[jc: this is based on Eric's patch but also fixes up the parsed
 subject headers].

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't parse any headers in the real body of an email message.</title>
<updated>2006-06-17T23:27:12+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2006-06-12T19:48:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=2662dbfa58a2d12d1ab3d240b643b9506f43523b'/>
<id>2662dbfa58a2d12d1ab3d240b643b9506f43523b</id>
<content type='text'>
It was pointed out that the current behaviour might mispart a patch comment
so remove this behaviour for now.

[jc: this fixes "From: line in the middle" check in t5100 test.]

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was pointed out that the current behaviour might mispart a patch comment
so remove this behaviour for now.

[jc: this fixes "From: line in the middle" check in t5100 test.]

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jc/mailinfo'</title>
<updated>2006-05-28T20:39:05+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-05-28T20:39:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=d177e584255aad351bbbff14aba8e73afc008c75'/>
<id>d177e584255aad351bbbff14aba8e73afc008c75</id>
<content type='text'>
* jc/mailinfo:
  mailinfo: skip bogus UNIX From line inside body
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* jc/mailinfo:
  mailinfo: skip bogus UNIX From line inside body
</pre>
</div>
</content>
</entry>
<entry>
<title>mailinfo: More carefully parse header lines in read_one_header_line()</title>
<updated>2006-05-26T07:49:36+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-05-26T07:46:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=ef29c11702594e616cf43bea260515d9f14f17b0'/>
<id>ef29c11702594e616cf43bea260515d9f14f17b0</id>
<content type='text'>
We exited prematurely from header parsing loop when the header
field did not have a space after the colon but we insisted on
it, and we got the check wrong because we forgot that we strip
the trailing whitespace before we do the check.

The space after the colon is not even required by RFC2822, so
stop requiring it.  While we are at it, the header line is
specified to be more strict than "anything with a colon in it"
(there must be one or more characters before the colon, and they
must not be controls, SP or non US-ASCII), so implement that
check as well, lest we mistakenly think something like:

	Bogus not a header line: this is not.

as a header line.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We exited prematurely from header parsing loop when the header
field did not have a space after the colon but we insisted on
it, and we got the check wrong because we forgot that we strip
the trailing whitespace before we do the check.

The space after the colon is not even required by RFC2822, so
stop requiring it.  While we are at it, the header line is
specified to be more strict than "anything with a colon in it"
(there must be one or more characters before the colon, and they
must not be controls, SP or non US-ASCII), so implement that
check as well, lest we mistakenly think something like:

	Bogus not a header line: this is not.

as a header line.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow in body headers beyond the in body header prefix.</title>
<updated>2006-05-23T21:11:03+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2006-05-23T19:58:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=2dec02b1ecafc47d4031d0a68a94c775a6a9ff9e'/>
<id>2dec02b1ecafc47d4031d0a68a94c775a6a9ff9e</id>
<content type='text'>
- handle_from is fixed to not mangle it's input line.

- Then handle_inbody_header is allowed to look in
  the body of a commit message for additional headers
  that we haven't already seen.

This allows patches with all of the right information in
unfortunate places to be imported.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- handle_from is fixed to not mangle it's input line.

- Then handle_inbody_header is allowed to look in
  the body of a commit message for additional headers
  that we haven't already seen.

This allows patches with all of the right information in
unfortunate places to be imported.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
