mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-17 21:13:46 +00:00
Fix cppcheck warning "scanf without field width limits can crash with huge input data"
This commit is contained in:
@@ -186,7 +186,7 @@ pn532_connstring_decode(const nfc_connstring connstring, struct pn532_spi_descri
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
unsigned long speed;
|
unsigned long speed;
|
||||||
if (sscanf(speed_s, "%lu", &speed) != 1) {
|
if (sscanf(speed_s, "%10lu", &speed) != 1) {
|
||||||
// speed_s is not a number
|
// speed_s is not a number
|
||||||
free(cs);
|
free(cs);
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user