squished the last remaining calls to sprintf
authorNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 12 Mar 2002 03:43:26 +0000 (03:43 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 12 Mar 2002 03:43:26 +0000 (03:43 +0000)
citadel/ChangeLog
citadel/mime_parser.c

index 849fe7052e08e42062a0641db826e3bed29e7d21..fbd8eedeee6d06d0a473a997aba9bc747bff7cde 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 590.143  2002/03/12 03:43:26  nbryant
+ squished the last remaining calls to sprintf
+
  Revision 590.142  2002/03/12 03:36:55  nbryant
  replace calls to gets with fgets
 
@@ -3447,4 +3450,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 5162d1c46e3b4c37d7e90572e4f39a121596ef9b..8203c86f89d957963e58a1949ec10ac9ae372758 100644 (file)
@@ -398,20 +398,23 @@ void the_mime_parser(char *partnum,
                }
 
                /* Figure out where the boundaries are */
-               sprintf(startary, "--%s", boundary);
-               sprintf(endary, "--%s--", boundary);
+               snprintf(startary, SIZ, "--%s", boundary);
+               snprintf(endary, SIZ, "--%s--", boundary);
                do {
                        if ( (!strncasecmp(ptr, startary, strlen(startary)))
                           || (!strncasecmp(ptr, endary, strlen(endary))) ) {
                                lprintf(9, "hit boundary!\n");
                                if (part_start != NULL) {
                                        if (strlen(partnum) > 0) {
-                                               sprintf(nested_partnum, "%s.%d",
-                                                       partnum, ++part_seq);
+                                               snprintf(nested_partnum,
+                                                        sizeof nested_partnum,
+                                                        "%s.%d", partnum,
+                                                        ++part_seq);
                                        }
                                        else {
-                                               sprintf(nested_partnum, "%d",
-                                                       ++part_seq);
+                                               snprintf(nested_partnum,
+                                                        sizeof nested_partnum,
+                                                        "%d", ++part_seq);
                                        }
                                        the_mime_parser(nested_partnum,
                                                    part_start, part_end,