Anomaly identified by the detector. Please review whether this anomaly corresponds to a misuse.
Finding:
8
In File:
sos/mrtd/PassportService.java
In Method:
readNationality()
Code with Finding:
class PassportService {
/**
* Reads the nationality of the passport holder.
*
* @return a string of length 3 containing the nationality of the passport holder
* @throws IOException if something goes wrong
*/
public String readNationality() throws IOException {
byte[] fileData = readMRZ();
DataInputStream in = new DataInputStream(new ByteArrayInputStream(fileData));
in.skip(2);
in.skip(3);
in.skip(39);
in.skip(9);
in.skip(1);
byte[] data = new byte[3];
in.readFully(data);
return new String(data).trim();
}
}