]>
git.ipfire.org Git - thirdparty/gnutls.git/commit
pkcs11: read pkcs11.conf at once with gnutls_load_file
clang-analyzer from Clang 19 complains about the fgets usage while a
mutex is held:
pkcs11.c:911:9: warning: Call to blocking function 'fgets' inside of critical section [unix.BlockInCriticalSection]
911 | while (fgets(line, sizeof(line), fp) != NULL) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes the logic to read the content of the file at once to
avoid iterative calls to fgets.
Signed-off-by: Daiki Ueno <ueno@gnu.org>