NetBSD Problem Report #53779
From www@NetBSD.org Tue Dec 11 18:48:45 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id E3CB77A1B1
for <gnats-bugs@gnats.NetBSD.org>; Tue, 11 Dec 2018 18:48:44 +0000 (UTC)
Message-Id: <20181211184843.ADA717A219@mollari.NetBSD.org>
Date: Tue, 11 Dec 2018 18:48:43 +0000 (UTC)
From: steffen@sdaoden.eu
Reply-To: steffen@sdaoden.eu
To: gnats-bugs@NetBSD.org
Subject: mail: header.c: cmatch(): mistreats "O"
X-Send-Pr-Version: www-1.0
>Number: 53779
>Category: bin
>Synopsis: mail: header.c: cmatch(): mistreats "O"
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 11 18:50:00 +0000 2018
>Originator: Steffen
>Release: master branch as of last month
>Organization:
In deep Trance
>Environment:
git
>Description:
Mr. Russell Bell reported an error for my BSD Mail clone, and it seems the bug is in there (at least) as early as BSD 8.1[.1] from 1996.
The "O" in optional is actually not optional, after the fix my MUA looks like
case 'O':
if(!digitchar(dc) && dc != ' ')
goto jleave;
tc = *tp++; /* is "0"! */
dc = *date;
if(digitchar(dc))
++date;
break;
>How-To-Repeat:
Using a From_ line with a date where the optional digit/space is missing should suffice to reveal the problem.
>Fix:
Peek at the next character: in the template this MUST be 0, in the input data this can be a digit or a space
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.