summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/libmilter
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/libmilter')
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_header.html13
-rw-r--r--contrib/sendmail/libmilter/engine.c12
2 files changed, 16 insertions, 9 deletions
diff --git a/contrib/sendmail/libmilter/docs/xxfi_header.html b/contrib/sendmail/libmilter/docs/xxfi_header.html
index 3ad3e5b..2111a73 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_header.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_header.html
@@ -2,7 +2,7 @@
<head><title>xxfi_header</title></head>
<body>
<!--
-$Id: xxfi_header.html,v 1.10 2003/03/05 19:57:55 ca Exp $
+$Id: xxfi_header.html,v 1.11 2006/04/05 17:10:43 ca Exp $
-->
<h1>xxfi_header</h1>
@@ -44,10 +44,11 @@ Handle a message header.
<td> Header field name.
</td></tr>
<tr valign="top"><td>headerv</td>
- <td>Header field value. The
- content of the header may include folded white space (i.e. multiple
- lines with following white space). The trailing line terminator (CR/LF)
- is removed.
+ <td>Header field value.
+ The content of the header may include folded white space,
+ i.e., multiple lines with following white space
+ where lines are separated by LF (not CR/LF).
+ The trailing line terminator (CR/LF) is removed.
</td></tr>
</table>
</td></tr>
@@ -67,7 +68,7 @@ RFC <a href="http://www.rfc-editor.org/rfc/rfc822.html">822</a>
<hr size="1">
<font size="-1">
-Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003, 2006 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
diff --git a/contrib/sendmail/libmilter/engine.c b/contrib/sendmail/libmilter/engine.c
index eeeb2c5..8b4bed0 100644
--- a/contrib/sendmail/libmilter/engine.c
+++ b/contrib/sendmail/libmilter/engine.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2004, 2006 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: engine.c,v 8.120 2004/10/20 21:09:00 ca Exp $")
+SM_RCSID("@(#)$Id: engine.c,v 8.121 2006/04/18 21:01:46 ca Exp $")
#include "libmilter.h"
@@ -166,6 +166,8 @@ static int next_states[] =
NX_UNKN
};
+#define SIZE_NEXT_STATES (sizeof(next_states) / sizeof(next_states[0]))
+
/* commands received by milter */
static cmdfct cmds[] =
{
@@ -1076,6 +1078,8 @@ trans_ok(old, new)
int s, n;
s = old;
+ if (s >= SIZE_NEXT_STATES)
+ return false;
do
{
/* is this state transition allowed? */
@@ -1089,6 +1093,8 @@ trans_ok(old, new)
*/
n = s + 1;
+ if (n >= SIZE_NEXT_STATES)
+ return false;
/*
** can we actually "skip" this state?
@@ -1100,7 +1106,7 @@ trans_ok(old, new)
s = n;
else
return false;
- } while (s <= ST_LAST);
+ } while (s < SIZE_NEXT_STATES);
return false;
}
/*
OpenPOWER on IntegriCloud