* [BUG] in tools/hcitool.c:cmd_scan
@ 2020-09-23 7:51 Bisseling
0 siblings, 0 replies; only message in thread
From: Bisseling @ 2020-09-23 7:51 UTC (permalink / raw)
To: linux-bluetooth
[BUG] in tools/hcitool.c:cmd_scan
Hi guys and gals,
I found a little bug in the above function and would like to have it fixed.
I could not find any other way to submit a bug than this mailing list.
The function contains the following code:
|
for (n = 0; n < 248 && name[n]; n++) {
if ((unsigned char) name[i] < 32 || name[i] == 127)
name[i] = '.';
} |
||
||
|It is pretty obvious that the loop should use the index variable n
instead of i in all three places. The variable i is the index variable
of the outer loop running over all responses. This mistake leads to
garbled names and sometimes even to SIGSEGV on x86_AMD64. How would I
fork your project and commit a pull request like on github? Thanks in
advance Georg |
||
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-23 7:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 7:51 [BUG] in tools/hcitool.c:cmd_scan Bisseling
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.