diff -rc pine4.53/pine/filter.c pine4.53.qpfilter/pine/filter.c
*** pine4.53/pine/filter.c	Wed Jan  8 12:13:50 2003
--- pine4.53.qpfilter/pine/filter.c	Thu Jan 16 09:50:00 2003
***************
*** 1693,1698 ****
--- 1693,1699 ----
      GF_INIT(f, f->next);
  
      if(flg == GF_DATA){
+ 	register unsigned char e;
  	register unsigned char c;
  	register int state = f->f1;
  
***************
*** 1713,1718 ****
--- 1714,1720 ----
  		break;
  
  	      case EQUAL  :
+ 		e = c;
  		if(c == '\015'){	/* "=\015" is a soft EOL */
  		    state = CCR;
  		    break;
***************
*** 1725,1733 ****
  		}
  
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
! 		    fs_give((void **)&(f->line));
! 		    gf_error("Non-hexadecimal character in QP encoding");
! 		    /* NO RETURN */
  		}
  
  		if (isdigit ((unsigned char)c))
--- 1727,1738 ----
  		}
  
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
!                     GF_PUTC(f->next,c); /* be tolerant to sender errors */
! 		    e = '\0';
!                     state = DFL;  
! 	            q_status_message(SM_ORDER, 3, 4,
! 			"Non-hexadecimal character in QP encoding");
!                     break;
  		}
  
  		if (isdigit ((unsigned char)c))
***************
*** 1741,1749 ****
  	      case HEX :
  		state = DFL;
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
! 		    fs_give((void **)&(f->line));
! 		    gf_error("Non-hexadecimal character in QP encoding");
! 		    /* NO RETURN */
  		}
  
  		if (isdigit((unsigned char)c))
--- 1746,1760 ----
  	      case HEX :
  		state = DFL;
  		if(!isxdigit((unsigned char)c)){	/* must be hex! */
!                     GF_PUTC(f->next,'='); /* be tolerant to sender errors */
! 		    if (e)
!   	              GF_PUTC(f->next,e);
! 		    e = '\0'; 
!                     GF_PUTC(f->next,c); 
!                     state = DFL;  
! 	            q_status_message(SM_ORDER, 3, 4,
! 			"Non-hexadecimal character in QP encoding");
!                     break;
  		}
  
  		if (isdigit((unsigned char)c))
