patch-decode_c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. $OpenBSD: patch-decode_c,v 1.5 2012/12/11 11:01:31 sthen Exp $
  2. --- decode.c.orig Mon Jul 21 21:47:54 2003
  3. +++ decode.c Tue Dec 11 10:47:55 2012
  4. @@ -28,10 +28,11 @@
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include <ctype.h>
  8. +#include <stdlib.h>
  9. +#include <md5.h>
  10. #include "xmalloc.h"
  11. #include "common.h"
  12. #include "part.h"
  13. -#include "md5.h"
  14. extern char *os_idtodir(char *id);
  15. extern FILE *os_newtypedfile(char *fname, char *contentType, int flags, params contentParams);
  16. @@ -545,8 +546,8 @@ getDispositionFilename(char *disposition)
  17. SkipWhitespace(&disposition);
  18. if (!disposition) return 0;
  19. - /* If we're looking at a ";", we found what we're looking for */
  20. - if (*disposition++ == ';') break;
  21. + /* If we're looking at an "=", we found what we're looking for */
  22. + if (*disposition++ == '=') break;
  23. }
  24. SkipWhitespace(&disposition);
  25. @@ -632,7 +633,7 @@ int handlePartial(struct part *inpart, char *headers,
  26. }
  27. /* Store number of parts in reassembly directory */
  28. sprintf(buf, "%sCT", dir);
  29. - partfile = os_createnewfile(buf);
  30. + partfile = os_resetfile(buf);
  31. if (!partfile) {
  32. os_perror(buf);
  33. goto ignore;