Anomaly identified by the detector. Please review whether this anomaly corresponds to a misuse.
Finding:
3
In File:
sos/mrtd/PassportService.java
In Method:
readDateOfExpiry()
Code with Finding:
class PassportService {
/**
* Reads the date of expiry of this document
*
* @return the date of expiry
*
* @throws IOException if something goes wrong
*/
public Date readDateOfExpiry() 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);
in.skip(3);
in.skip(6);
in.skip(1);
in.skip(1);
byte[] data = new byte[6];
in.readFully(data);
return makeDate(2000, new String(data).trim());
}
}