]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix Coverity defects in soft-pkcs11 test code 955/head
authorGreg Hudson <ghudson@mit.edu>
Sat, 20 Jul 2019 04:51:52 +0000 (00:51 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 29 Jul 2019 19:42:38 +0000 (15:42 -0400)
commitb4831515b2f3b6fd7d7fd4bff4558c10c710891d
tree5b794b7bddcc2a16638878a527805aef71170aad
parentc2497d46b4bad473e164943d67b58cd1ae261c3a
Fix Coverity defects in soft-pkcs11 test code

Nothing in the code removes objects from soft_token.object.obs, so
simplify add_st_object() not to search for an empty slot.  Avoid using
random() by using a counter for session handles and just the array
slot number for object handles.  Add a helper get_rcfilename() to
facilitate checking the result of asprintf().  Properly initialize ap
in sprintf_fill().  Close the file handle in read_conf_file().
src/tests/softpkcs11/main.c