]> code.citadel.org Git - citadel.git/commitdiff
* Fix an off-by-one error in the mime parser
authorArt Cancro <ajc@citadel.org>
Tue, 29 Apr 2003 04:41:22 +0000 (04:41 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 29 Apr 2003 04:41:22 +0000 (04:41 +0000)
citadel/ChangeLog
citadel/mime_parser.c

index fb1521f6674bdbba2d5b64da939a3548949da9c4..9b5f173fa7bd90d2182177d17bbfa391d5eb930b 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 605.42  2003/04/29 04:41:22  ajc
+ * Fix an off-by-one error in the mime parser
+
  Revision 605.41  2003/04/29 04:13:58  ajc
  * mime parser: look for the "name=" subfield tacked onto either
    Content-type or Content-disposition, wherever it finds it.
@@ -4659,4 +4662,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 3e575d4ad55ed18a3329c538c470bec6cdcc17db..ff206dbcd8c9c2371c0b3b690cae938f9e401be6 100644 (file)
@@ -450,6 +450,9 @@ void the_mime_parser(char *partnum,
                        ++length;
                }
                part_end = content_end;
+                /* fix an off-by-one error */
+                --part_end;
+                --length;
                
                /* Truncate if the header told us to */
                if ( (content_length > 0) && (length > content_length) ) {