#fixed code
                             private void copyExecutableAndClasspath(PackrOutput output) throws IOException {
		byte[] exe = null;
		String extension = "";

		switch (config.platform) {
			case Windows32:
				exe = readResource("/packr-windows.exe");
				extension = ".exe";
				break;
			case Windows64:
				exe = readResource("/packr-windows-x64.exe");
				extension = ".exe";
				break;
			case Linux32:
				exe = readResource("/packr-linux");
				break;
			case Linux64:
				exe = readResource("/packr-linux-x64");
				break;
			case MacOS:
				exe = readResource("/packr-mac");
				break;
		}

		System.out.println("Copying executable ...");

		try (OutputStream writer = new FileOutputStream(
				new File(output.executableFolder, config.executable + extension))) {

			writer.write(exe);
		}

		PackrFileUtils.chmodX(new File(output.executableFolder, config.executable + extension));

		System.out.println("Copying classpath(s) ...");
		for (String file : config.classpath) {
			File cpSrc = new File(file);
			File cpDst = new File(output.resourcesFolder, new File(file).getName());

			if (cpSrc.isFile()) {
				PackrFileUtils.copyFile(cpSrc, cpDst);
			} else if (cpSrc.isDirectory()) {
				PackrFileUtils.copyDirectory(cpSrc, cpDst);
			} else {
				System.err.println("Warning! Classpath not found: " + cpSrc);
			}
		}
	}
#vulnerable code 
                             private void copyExecutableAndClasspath(PackrOutput output) throws IOException {
		byte[] exe = null;
		String extension = "";

		switch (config.platform) {
			case Windows32:
				exe = readResource("/packr-windows.exe");
				extension = ".exe";
				break;
			case Windows64:
				exe = readResource("/packr-windows-x64.exe");
				extension = ".exe";
				break;
			case Linux32:
				exe = readResource("/packr-linux");
				break;
			case Linux64:
				exe = readResource("/packr-linux-x64");
				break;
			case MacOS:
				exe = readResource("/packr-mac");
				break;
		}

		System.out.println("Copying executable ...");
		new FileOutputStream(new File(output.executableFolder, config.executable + extension)).write(exe);
		PackrFileUtils.chmodX(new File(output.executableFolder, config.executable + extension));

		System.out.println("Copying classpath(s) ...");
		for (String file : config.classpath) {
			File cpSrc = new File(file);
			File cpDst = new File(output.resourcesFolder, new File(file).getName());

			if (cpSrc.isFile()) {
				PackrFileUtils.copyFile(cpSrc, cpDst);
			} else if (cpSrc.isDirectory()) {
				PackrFileUtils.copyDirectory(cpSrc, cpDst);
			} else {
				System.err.println("Warning! Classpath not found: " + cpSrc);
			}
		}
	} 
                            #location 26 
                            #vulnerability type RESOURCE_LEAK