]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix bugs found by Coverity in decryptcore(8) and savecore(8):
authorKonrad Witaszczyk <def@FreeBSD.org>
Sat, 4 Feb 2017 14:10:16 +0000 (14:10 +0000)
committerKonrad Witaszczyk <def@FreeBSD.org>
Sat, 4 Feb 2017 14:10:16 +0000 (14:10 +0000)
commit3c7ccf15c787dc25a1f5c0d781aac4d32430f5c7
tree014c1e029b861fcd70373602d8f865e5c649c802
parent9fb10d635e913262789526e3cbf8b27951a34d13
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: 1366936136694213669511366952
Approved by: pjd (mentor)
sbin/decryptcore/decryptcore.c
sbin/savecore/savecore.c