diff options
author | jbeck <none@none> | 2006-06-14 16:28:11 -0700 |
---|---|---|
committer | jbeck <none@none> | 2006-06-14 16:28:11 -0700 |
commit | 3ee0e49223f178da635734759b9167f924321ff0 (patch) | |
tree | daf6b9db83bf248c1f34585c09103c55d9fb5e46 /usr/src/cmd/sendmail/libmilter | |
parent | fafcdcb71339b8734729cfa88989e0d8d5e0a9a3 (diff) | |
download | illumos-joyent-3ee0e49223f178da635734759b9167f924321ff0.tar.gz |
6424201 sendmail MIME multipart nesting issue
6438600 upgrade sendmail to 8.13.7
Diffstat (limited to 'usr/src/cmd/sendmail/libmilter')
-rw-r--r-- | usr/src/cmd/sendmail/libmilter/engine.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr/src/cmd/sendmail/libmilter/engine.c b/usr/src/cmd/sendmail/libmilter/engine.c index 19f8218bc9..247a6e3b0c 100644 --- a/usr/src/cmd/sendmail/libmilter/engine.c +++ b/usr/src/cmd/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 @@ -11,7 +11,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #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" @@ -168,6 +168,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[] = { @@ -1078,6 +1080,8 @@ trans_ok(old, new) int s, n; s = old; + if (s >= SIZE_NEXT_STATES) + return false; do { /* is this state transition allowed? */ @@ -1091,6 +1095,8 @@ trans_ok(old, new) */ n = s + 1; + if (n >= SIZE_NEXT_STATES) + return false; /* ** can we actually "skip" this state? @@ -1102,7 +1108,7 @@ trans_ok(old, new) s = n; else return false; - } while (s <= ST_LAST); + } while (s < SIZE_NEXT_STATES); return false; } /* |