Validate RSC filenames
authortb <tb@openbsd.org>
Tue, 10 May 2022 07:41:37 +0000 (07:41 +0000)
committertb <tb@openbsd.org>
Tue, 10 May 2022 07:41:37 +0000 (07:41 +0000)
commit203dfefc80f463dd05384bf5ace416e3efbdb840
tree3faea9c4a9a366c5f1109db5aa533a325e76716d
parent820799d0f8c8bf5372d331dd9f0ae5cfabf401ab
Validate RSC filenames

Factor out POSIX portable filename check into a new valid_filename() and
rename the previous valid_filename() to valid_mft_filename().  Fixes and
supersedes imcomplete checks in the RSC code. Avoids truncation via
strndup() in case of embedded NULs.

input/ok claudio
usr.sbin/rpki-client/extern.h
usr.sbin/rpki-client/mft.c
usr.sbin/rpki-client/rsc.c
usr.sbin/rpki-client/validate.c