< prev index next >

src/java.base/share/native/libzip/zip_util.c

Print this page

        

*** 134,152 **** disposition, /* creation disposition */ flagsAndAttributes, /* flags and attributes */ NULL); } else { /* Get required buffer size to convert to Unicode */ ! int wfname_len = MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS, fname, -1, NULL, 0); if (wfname_len == 0) { return (jlong)INVALID_HANDLE_VALUE; } if ((wfname = (WCHAR*)malloc(wfname_len * sizeof(WCHAR))) == NULL) { return (jlong)INVALID_HANDLE_VALUE; } ! if (MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS, fname, -1, wfname, wfname_len) == 0) { free(wfname); return (jlong)INVALID_HANDLE_VALUE; } wprefixed_fname = getPrefixed(wfname, (int)fname_length); --- 134,152 ---- disposition, /* creation disposition */ flagsAndAttributes, /* flags and attributes */ NULL); } else { /* Get required buffer size to convert to Unicode */ ! int wfname_len = MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, fname, -1, NULL, 0); if (wfname_len == 0) { return (jlong)INVALID_HANDLE_VALUE; } if ((wfname = (WCHAR*)malloc(wfname_len * sizeof(WCHAR))) == NULL) { return (jlong)INVALID_HANDLE_VALUE; } ! if (MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, fname, -1, wfname, wfname_len) == 0) { free(wfname); return (jlong)INVALID_HANDLE_VALUE; } wprefixed_fname = getPrefixed(wfname, (int)fname_length);
< prev index next >