[git] GnuPG - branch, master, updated. gnupg-2.1.11-33-g2f02ed7

by Neal H. Walfield cvs at cvs.gnupg.org
Tue Feb 16 15:34:37 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  2f02ed75a9671a7aae36968d5a1618f71b491325 (commit)
      from  a1c11283af759c1045a8bb75815db325f415ded4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2f02ed75a9671a7aae36968d5a1618f71b491325
Author: Neal H. Walfield <neal at g10code.com>
Date:   Sun Feb 14 16:00:10 2016 +0100

    gpg: Make ASCII armor decoding more robust to encoding errors.
    
    * g10/armor.c (radix64_read): If the = is followed by the string "3D",
    check if the following four characters are valid radix 64 and are
    followed by a new line.  If so, warn and ignore the '3D'.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
    GnuPG-bug-id: 2250

diff --git a/g10/armor.c b/g10/armor.c
index 55ee5d3..e34518e 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -796,6 +796,24 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn,
 		}
 	    }
 
+            /* Occasionally a bug MTA will leave the = escaped as
+               =3D.  If the 4 characters following that are valid
+               Radix64 characters and they are following by a new
+               line, assume that this is the case and skip the
+               3D.  */
+            if (afx->buffer_pos + 6 < afx->buffer_len
+                && afx->buffer[afx->buffer_pos + 0] == '3'
+                && afx->buffer[afx->buffer_pos + 1] == 'D'
+                && asctobin[afx->buffer[afx->buffer_pos + 2]] != 255
+                && asctobin[afx->buffer[afx->buffer_pos + 3]] != 255
+                && asctobin[afx->buffer[afx->buffer_pos + 4]] != 255
+                && asctobin[afx->buffer[afx->buffer_pos + 5]] != 255
+                && afx->buffer[afx->buffer_pos + 6] == '\n')
+              {
+                afx->buffer_pos += 2;
+                afx->qp_detected = 1;
+              }
+
 	    if (!n)
 	      onlypad = 1;
 

-----------------------------------------------------------------------

Summary of changes:
 g10/armor.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list