diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:20:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:20:30 +0000 |
commit | 31acb164b1ffc24a287b1fe97eea5e4beeaf5f5a (patch) | |
tree | 3aab995beff7993d741c493392c0e1f14376d79b /src/hid_netbsd.c | |
parent | Adding upstream version 1.14.0. (diff) | |
download | libfido2-9290f1892283356a31d84cf961b3a696601037cf.tar.xz libfido2-9290f1892283356a31d84cf961b3a696601037cf.zip |
Adding upstream version 1.15.0.upstream/1.15.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/hid_netbsd.c')
-rw-r--r-- | src/hid_netbsd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hid_netbsd.c b/src/hid_netbsd.c index d5b9fad..df85282 100644 --- a/src/hid_netbsd.c +++ b/src/hid_netbsd.c @@ -127,14 +127,14 @@ fido_hid_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen) char path[64]; size_t i; + if (devlist == NULL || olen == NULL) + return (FIDO_ERR_INVALID_ARGUMENT); + *olen = 0; if (ilen == 0) return (FIDO_OK); /* nothing to do */ - if (devlist == NULL || olen == NULL) - return (FIDO_ERR_INVALID_ARGUMENT); - for (i = *olen = 0; i < MAX_UHID && *olen < ilen; i++) { snprintf(path, sizeof(path), "/dev/uhid%zu", i); if (copy_info(&devlist[*olen], path) == 0) { |