]> granicus.if.org Git - uw-imap/commitdiff
add files for 2008-03-28T01:37:53Z
authorUnknown <>
Fri, 28 Mar 2008 01:37:53 +0000 (01:37 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Fri, 7 Sep 2018 00:05:07 +0000 (00:05 +0000)
src/osdep/amiga/mmdf.c
src/osdep/unix/mmdf.c

index f79e7619d66f19352103be16714ff22609de79da..e962434e2e1240f58d1aed790c7d4f4716d71b98 100644 (file)
@@ -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.
  * 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);
index f79e7619d66f19352103be16714ff22609de79da..e962434e2e1240f58d1aed790c7d4f4716d71b98 100644 (file)
@@ -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.
  * 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);