1 --- orginal/convert.cpp 2009-04-14 00:16:33.000000000 +0700
2 +++ convert.cpp 2009-06-12 14:00:32.000000000 +0700
4 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5 --------------------------------------------------------------------------------*/
15 - char *tmpName = NULL;
24 - tmpName = tempnam(outDir, NULL);
25 + strcpy(tmpName, outDir);
26 + strcat(tmpName, "XXXXXX");
28 - if (tmpName == NULL) {
29 + if (mkstemp(tmpName) == -1) {
31 ret = VNCONV_ERR_OUTPUT_FILE;
38 ret = VNCONV_ERR_OUTPUT_FILE;
44 sprintf(cmd, "mv %s %s", tmpName, outFile);
46 + int tmp = system(cmd);
48 if (rename(tmpName, outFile) != 0) {
51 ret = VNCONV_ERR_OUTPUT_FILE;
63 return genConvert(*pInCharset, *pOutCharset, is, os);
66 -char *ErrTable[VNCONV_LAST_ERROR] =
67 +const char *ErrTable[VNCONV_LAST_ERROR] =