blob: 145cfb5df1f22ed8d92aca15d9f1ebf2d730dee6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$NetBSD: patch-ag,v 1.1 2003/10/08 20:23:43 itojun Exp $
--- rfc822.c- 2003-10-06 13:28:06.000000000 +0900
+++ rfc822.c 2003-10-06 13:28:41.000000000 +0900
@@ -176,7 +176,7 @@
case 3: /* we're in a <>-enclosed address */
if (*from == '@' || *from == '!')
has_host_part = TRUE;
- else if (*from == '>' && from[-1] != '<')
+ else if (*from == '>' && (from > buf && from[-1] != '<'))
{
state = 1;
if (!has_host_part)
@@ -198,7 +198,7 @@
/*
* If we passed a comma, reset everything.
*/
- if (from[-1] == ',' && !parendepth) {
+ if ((from > buf && from[-1] == ',') && !parendepth) {
has_host_part = has_bare_name_part = FALSE;
parens_from = NULL;
}
|