Diff between 3a140aa35b7b7dc1d7b031eec40590187f70a980 and b8887cf03adb19a8f7041dd414f1d5e0b1aa4b26
Changed Files
| File | Additions | Deletions | Status |
| plugins/autopair.c | +2 | -2 | modified |
Full Patch
diff --git a/plugins/autopair.c b/plugins/autopair.c
index b87e621..d44cf53 100644
--- a/plugins/autopair.c
+++ b/plugins/autopair.c
@@ -59,7 +59,7 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
unsigned int attempt)
{
char addr[18];
- char pinstr[8];
+ char pinstr[7];
uint32_t class;
ba2str(device_get_address(device), addr);
@@ -110,7 +110,7 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
if (attempt >= 4)
return 0;
- snprintf(pinstr, sizeof(pinstr), "%06d",
+ snprintf(pinstr, sizeof(pinstr), "%06u",
rand() % 1000000);
*display = true;
memcpy(pinbuf, pinstr, 6);