Home GnuPG
Diffusion GnuPG de7f7b98dfeb

gpgparsemail: Fix case of zero length continuation lines.
de7f7b98dfebUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpgparsemail: Fix case of zero length continuation lines.

* tools/rfc822parse.c (parse_field): Loop after continuation line.

Using header lines like

Name:[lf]
[space][lf]
[lf]

resulted in running into the "(s2 = strchr (delimiters2, *s)" branch
and inserting a new token for the empty continuation line. This also
led to one byte read after the string which is what Hanno figured.
The new code should handle empty continuation lines correct.

(backported from 2.1 commit 3fbeba64a8bfb2b673230c124a3d616b6568fd2f)

  • Reported-by: Hanno Böck
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 9 2015, 7:06 PM
gniibeCommitted on Apr 15 2015, 9:07 AM
Parents
rGa838e8f80669: agent: Fix length test in sshcontrol parser.
Branches
Unknown
Tags
Unknown

Event Timeline

NIIBE Yutaka <gniibe@fsij.org> committed rGde7f7b98dfeb: gpgparsemail: Fix case of zero length continuation lines. (authored by Werner Koch <wk@gnupg.org>).Apr 15 2015, 9:07 AM