Patent ID: 7962952

Claim:
A portable recording device storing a program causing a computer to execute a subprocess that includes a process performed in response to a call from a caller program and a return process to return the result of the process to the caller program, the subprocess comprising: acquiring an access destination address to be accessed by the program, the access destination address being assigned to a memory area of the caller program; acquiring memory information about the memory area used by the caller program based on the acquired access destination address, the memory information indicating if the memory area is executable; determining, when acquired memory information indicates that the memory area is not executable, that the caller program is not legitimate; if it is determined that the caller program is not legitimate, terminating execution of the subprocess; determining, when acquired memory information indicates that the memory area is executable, if the caller program is legitimate caller program based on the acquired access destination address and an original access destination address of a legitimate caller program registered in advance; and acquiring a start address of the memory area where the caller program is stored, based on the acquired access destination address; if the acquired start address and a start address of the legitimate caller program registered in advance are different, determining the difference; correcting the acquired access destination address based on the difference; and determining if the caller program is legitimate based on the corrected access destination address.