1 diff -u -r ../hunspell-1.3.3/src/tools/hzip.c ./src/tools/hzip.c
2 --- ../hunspell-1.3.3/src/tools/hzip.c 2012-06-30 07:18:47.000000000 -0400
3 +++ ./src/tools/hzip.c 2016-03-06 02:30:47.121570946 -0500
5 strcat(out, EXTENSION);
6 f = fopen(filename, "r");
7 if (!f) return fail("hzip: %s: Permission denied\n", filename);
9 + char tmpfile_template[] = "@TERMUX_PREFIX@/tmp/hunspell.XXXXXX";
10 + int tmpfile_fd = mkstemp(tmpfile_template);
11 + tempfile = fdopen(tmpfile_fd, "w+");
17 return fail("hzip: cannot create temporary file\n", NULL);
19 f2 = fopen(out, "wb");
23 + unlink(tmpfile_template);
26 return fail("hzip: %s: Permission denied\n", out);
29 if (prefixcompress(f, tempfile) != 0) {
33 + unlink(tmpfile_template);
36 return fail("hzip: cannot write file\n", NULL);
39 n = encode_file(table, n, tempfile, f2, termword, key);
43 + unlink(tmpfile_template);
46 if (n != 0) return fail("hzip: cannot write file\n", NULL);