mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* armor.c (fake_packet): Allow arbitrary dash-escaped lines as per
2440bis-10. This is bug #158.
This commit is contained in:
parent
5887f2fb26
commit
0d6defc0da
@ -1,5 +1,8 @@
|
|||||||
2004-10-13 David Shaw <dshaw@jabberwocky.com>
|
2004-10-13 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* armor.c (fake_packet): Allow arbitrary dash-escaped lines as per
|
||||||
|
2440bis-10. This is bug #158.
|
||||||
|
|
||||||
* keyserver.c (keyserver_work): Handle keyserver timeouts.
|
* keyserver.c (keyserver_work): Handle keyserver timeouts.
|
||||||
|
|
||||||
* pkclist.c (do_edit_ownertrust): Different prompt when we're
|
* pkclist.c (do_edit_ownertrust): Different prompt when we're
|
||||||
|
17
g10/armor.c
17
g10/armor.c
@ -545,18 +545,17 @@ fake_packet( armor_filter_context_t *afx, IOBUF a,
|
|||||||
p = afx->buffer;
|
p = afx->buffer;
|
||||||
n = afx->buffer_len;
|
n = afx->buffer_len;
|
||||||
|
|
||||||
if( n > 2 && *p == '-' ) {
|
if( n > 2 && *p == '-' )
|
||||||
|
{
|
||||||
/* check for dash escaped or armor header */
|
/* check for dash escaped or armor header */
|
||||||
if( p[1] == ' ' && !afx->not_dash_escaped ) {
|
if( p[1] == ' ' && !afx->not_dash_escaped )
|
||||||
/* issue a warning if it is not regular encoded */
|
{
|
||||||
if( p[2] != '-' && !( n > 6 && !memcmp(p+2, "From ", 5))) {
|
/* It's a dash-escaped line */
|
||||||
log_info(_("invalid dash escaped line: "));
|
|
||||||
print_string( stderr, p, n, 0 );
|
|
||||||
putc('\n', stderr);
|
|
||||||
}
|
|
||||||
afx->buffer_pos = 2; /* skip */
|
afx->buffer_pos = 2; /* skip */
|
||||||
}
|
}
|
||||||
else if( n >= 15 && p[1] == '-' && p[2] == '-' && p[3] == '-' ) {
|
else if( n >= 15 && p[1] == '-' && p[2] == '-' && p[3] == '-' )
|
||||||
|
{
|
||||||
|
/* It's armor header */
|
||||||
int type = is_armor_header( p, n );
|
int type = is_armor_header( p, n );
|
||||||
if( afx->not_dash_escaped && type != BEGIN_SIGNATURE )
|
if( afx->not_dash_escaped && type != BEGIN_SIGNATURE )
|
||||||
; /* this is okay */
|
; /* this is okay */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user