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