mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-11 09:06:17 +00:00
Fix cppcheck warning "buffer may not be null-terminated after call to strncpy()"
This commit is contained in:
@@ -226,6 +226,7 @@ nfc_open(nfc_context *context, const nfc_connstring connstring)
|
||||
}
|
||||
} else {
|
||||
strncpy(ncs, connstring, sizeof(nfc_connstring));
|
||||
ncs[sizeof(nfc_connstring) - 1] = '\0';
|
||||
}
|
||||
|
||||
// Search through the device list for an available device
|
||||
|
||||
Reference in New Issue
Block a user