Language: Java
Label: vulnerable
CWE: CWE-354 \u2014 Improper Validation of Integrity Check Value
The product does not validate or incorrectly validates the integrity check values or "checksums" of a message. This may prevent it from detecting if the data has been modified or corrupted in transmission.

Code:
	private static void addExtraKexAlgorithms(CryptoWishList cwl) {
		String[] oldKexAlgorithms = cwl.kexAlgorithms;
		List<String> kexAlgorithms = new ArrayList<>(oldKexAlgorithms.length + 1);
		for (String algo : oldKexAlgorithms)
		{
			if (!algo.equals(EXT_INFO_C))
				kexAlgorithms.add(algo);
		}
		kexAlgorithms.add(EXT_INFO_C);
		cwl.kexAlgorithms = kexAlgorithms.toArray(new String[0]);
	}