NetBSD Problem Report #53779

From  Tue Dec 11 18:48:45 2018
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id E3CB77A1B1
	for <>; Tue, 11 Dec 2018 18:48:44 +0000 (UTC)
Message-Id: <>
Date: Tue, 11 Dec 2018 18:48:43 +0000 (UTC)
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
In deep Trance
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;
Using a From_ line with a date where the optional digit/space is missing should suffice to reveal the problem.
Peek at the next character: in the template this MUST be 0, in the input data this can be a digit or a space

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.