#vulnerable code 
                             protected static ICC_Profile getICCProfile(ByteSource byteSource, Map params)
			throws ImageReadException, IOException {
		byte bytes[] = getICCProfileBytes(byteSource, params);
		if (bytes == null)
			return null;

		IccProfileParser parser = new IccProfileParser();
		IccProfileInfo info = parser.getICCProfileInfo(bytes);
		if (info.issRGB())
			return null;

		ICC_Profile icc = ICC_Profile.getInstance(bytes);
		return icc;
	} 
                            #location 9 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             protected static ICC_Profile getICCProfile(ByteSource byteSource, Map params)
			throws ImageReadException, IOException {
		byte bytes[] = getICCProfileBytes(byteSource, params);
		if (bytes == null)
			return null;

		IccProfileParser parser = new IccProfileParser();
		IccProfileInfo info = parser.getICCProfileInfo(bytes);
		if (info == null)
			return null;
		if (info.issRGB())
			return null;

		ICC_Profile icc = ICC_Profile.getInstance(bytes);
		return icc;
	}