From: Unknown <> Date: Fri, 28 Mar 2008 01:37:53 +0000 (+0000) Subject: add files for 2008-03-28T01:37:53Z X-Git-Tag: imap-2007b~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d832b7385110fab5d2af2af28d1f8e4c4d3d34f0;p=uw-imap add files for 2008-03-28T01:37:53Z --- diff --git a/src/osdep/amiga/mmdf.c b/src/osdep/amiga/mmdf.c index f79e761..e962434 100644 --- a/src/osdep/amiga/mmdf.c +++ b/src/osdep/amiga/mmdf.c @@ -1,5 +1,5 @@ /* ======================================================================== - * Copyright 1988-2007 University of Washington + * Copyright 1988-2008 University of Washington * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,15 +15,13 @@ * Program: MMDF mail routines * * Author: Mark Crispin - * Networks and Distributed Computing - * Computing & Communications + * UW Technology * University of Washington - * Administration Building, AG-44 * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU + * Internet: MRC@Washington.EDU * * Date: 20 December 1989 - * Last Edited: 5 September 2007 + * Last Edited: 27 March 2008 */ @@ -1737,7 +1735,7 @@ int mmdf_parse (MAILSTREAM *stream,DOTLOCK *lock,int op) /* find end of keyword */ if (!(u = strpbrk (s," \n\r"))) u = s + strlen (s); /* got a keyword? */ - if ((k = (u - s)) <= MAXUSERFLAG) { + if ((k = (u - s)) && (k <= MAXUSERFLAG)) { uf.data = (unsigned char *) s; uf.size = k; for (j = 0; (j < NUSERFLAGS) && stream->user_flags[j]; ++j) @@ -1791,7 +1789,8 @@ int mmdf_parse (MAILSTREAM *stream,DOTLOCK *lock,int op) while (*s == ' ') s++; u = strpbrk (s," \n\r"); /* got a keyword? */ - if ((j < NUSERFLAGS) && ((k = (u - s)) <= MAXUSERFLAG)) { + if ((j < NUSERFLAGS) && (k = (u - s)) && + (k <= MAXUSERFLAG)) { if (stream->user_flags[j]) fs_give ((void **) &stream->user_flags[j]); stream->user_flags[j] = (char *) fs_get (k + 1); diff --git a/src/osdep/unix/mmdf.c b/src/osdep/unix/mmdf.c index f79e761..e962434 100644 --- a/src/osdep/unix/mmdf.c +++ b/src/osdep/unix/mmdf.c @@ -1,5 +1,5 @@ /* ======================================================================== - * Copyright 1988-2007 University of Washington + * Copyright 1988-2008 University of Washington * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,15 +15,13 @@ * Program: MMDF mail routines * * Author: Mark Crispin - * Networks and Distributed Computing - * Computing & Communications + * UW Technology * University of Washington - * Administration Building, AG-44 * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU + * Internet: MRC@Washington.EDU * * Date: 20 December 1989 - * Last Edited: 5 September 2007 + * Last Edited: 27 March 2008 */ @@ -1737,7 +1735,7 @@ int mmdf_parse (MAILSTREAM *stream,DOTLOCK *lock,int op) /* find end of keyword */ if (!(u = strpbrk (s," \n\r"))) u = s + strlen (s); /* got a keyword? */ - if ((k = (u - s)) <= MAXUSERFLAG) { + if ((k = (u - s)) && (k <= MAXUSERFLAG)) { uf.data = (unsigned char *) s; uf.size = k; for (j = 0; (j < NUSERFLAGS) && stream->user_flags[j]; ++j) @@ -1791,7 +1789,8 @@ int mmdf_parse (MAILSTREAM *stream,DOTLOCK *lock,int op) while (*s == ' ') s++; u = strpbrk (s," \n\r"); /* got a keyword? */ - if ((j < NUSERFLAGS) && ((k = (u - s)) <= MAXUSERFLAG)) { + if ((j < NUSERFLAGS) && (k = (u - s)) && + (k <= MAXUSERFLAG)) { if (stream->user_flags[j]) fs_give ((void **) &stream->user_flags[j]); stream->user_flags[j] = (char *) fs_get (k + 1);