41ed53ba17
- recognise PNG files and set appropriate mime type (from FreeBSD). - remove botched mkstemp() conversion which broke mpack(1); a proper mkstemp conversion is intrusive. - use some additional XXXX in the temporary filename. - let this build with CLang scan-build.
21 lines
604 B
Plaintext
21 lines
604 B
Plaintext
$OpenBSD: patch-encode_c,v 1.2 2012/12/11 11:01:31 sthen Exp $
|
|
--- encode.c.orig Mon Jul 21 21:35:31 2003
|
|
+++ encode.c Tue Dec 11 10:01:54 2012
|
|
@@ -24,6 +24,7 @@
|
|
*/
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
+#include <stdlib.h>
|
|
|
|
extern char *magic_look(FILE *infile);
|
|
extern char *os_genid(void);
|
|
@@ -43,7 +44,7 @@ int encode(FILE *infile, FILE *applefile, char *fname,
|
|
char *type;
|
|
FILE *outfile;
|
|
char *cleanfname, *p;
|
|
- char *digest, *appledigest;
|
|
+ char *digest, *appledigest = NULL;
|
|
long filesize, l, written;
|
|
int thispart, numparts = 1;
|
|
int wrotefiletype = 0;
|