HomeFreeBSD

Fix bugs found by Coverity in decryptcore(8) and savecore(8):

Description

Fix bugs found by Coverity in decryptcore(8) and savecore(8):

  • Perform final decryption and write decrypted data in case of non-block aligned

input data;

  • Use strlcpy(3) instead of strncpy(3) to verify if paths aren't too long;
  • Check errno after calling unlink(2) instead of calling stat(2) in order to

verify if a decrypted core was created by a child process;

  • Free dumpkey.

Reported by: Coverity, cem, pfg
Suggested by: cem
CID: 1366936, 1366942, 1366951, 1366952
Approved by: pjd (mentor)

Details

Committed
defFeb 4 2017, 2:10 PM
Parents
rS313194: Define the vm_ooffset_t and vm_pindex_t types as machine-independend.
Branches
Unknown
Tags
Unknown