aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorRasmus Villemoes <[email protected]>2018-08-22 15:22:15 +0200
committerKalle Valo <[email protected]>2018-08-31 18:48:02 +0300
commitcb18e2e9ec71d42409a51b83546686c609780dde (patch)
tree08bea7cfad76fdbed3e57c107851bd36023b691d /tools/perf/scripts/python
parentf483039cf51acf30494cd754194562c22cf98764 (diff)
brcmfmac: fix wrong strnchr usage
strnchr takes arguments in the order of its name: string, max bytes to read, character to search for. Here we're passing '\n' aka 10 as the buffer size, and searching for sizeof(buf) aka BRCMF_DCMD_SMLEN aka 256 (aka '\0', since it's implicitly converted to char) within those 10 bytes. Just interchanging the last two arguments would still leave a bug, because if we've been successful once, there are not sizeof(buf) characters left after the new value of p. Since clmver is immediately afterwards passed as a %s argument, I assume that it is actually a properly nul-terminated string. For that case, we have strreplace(). Signed-off-by: Rasmus Villemoes <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions