🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #476

buglet (?) in qp-decode.c

#476
From: Ralf Fassel
Date: Mon, 30 Jun 2008 10:11
30 lines
1763 bytes
When a quoted-printable message is incorrectly terminated at EOF:

    p;</td>=0A=0A        <td width=3D"49%">&nbsp;</td>=0A      </tr>=0A    </tb=
    ody>=0A  </table>=0A</body>=0A</html>=0A=
    --=_mixed 002D08B5C1257475_=--

(missing newline before the separator) qp-decode barfs:

Error: line 758: '^@' is something other than line break or hex digit after = in quoted-printable encoding

and continues to read into the invalid buffer contents.

IMHO, if EOF is encountered, it simply should stop processing and
issue no error message:

*** src/qp-decode.c~	Wed Feb 20 22:11:51 2008
--- src/qp-decode.c	Mon Jun 30 12:03:41 2008
***************
*** 88,93 ****
--- 88,94 ----
  		for (stop++; *stop && (*stop == ' ' || *stop == '\t'); stop++)
  		    ;
  	    } else {
+ 	      if (feof(stdin)) exit(0);
  		fprintf(stderr, "Error: line %d: '%c' is something other than line break or hex digit after = in quoted-printable encoding\n", lineno, *stop);
  		putchar('=');
  		putchar(*stop);


R'
Technical Details
Message-ID: <ygalk0ni65f.fsf@gepard2.akutech-local.de>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,141bbfda3d9204c6,start
X-Google-Attributes: gidf6829,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Ralf Fassel <ralfixx@gmx.de>
Newsgroups: gnu.emacs.vm.bug
Subject: buglet (?) in qp-decode.c
Date: Mon, 30 Jun 2008 12:11:40 +0200
Lines: 30
Message-ID: <ygalk0ni65f.fsf@gepard2.akutech-local.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: individual.net tI74UX3RiC7qfLj77V6AZgq6fxWIB87ddig3KJvEQR4iNgnOU=
Cancel-Lock: sha1:drnydnecyOclEw7j6p2AVvLrS+k= sha1:shRodmtLklqWHYFkeFEyCH4YvwM=
User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.5-b27 (linux)