NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/53779: mail: header.c: cmatch(): mistreats "O"



>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



Home | Main Index | Thread Index | Old Index