Commit fb4bccd8 authored by Ben Greear's avatar Ben Greear Committed by Johannes Berg

mac80211: fix ht_capa printout in debugfs

Don't use sizeof(pointer) when calculating scnprintf offset.

Fixes: 01f84f0e ("mac80211: reduce stack usage in debugfs")
Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Link: https://lore.kernel.org/r/20220406175659.20611-1-greearb@candelatech.com
[correct the Fixes tag]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a5199b56
......@@ -441,7 +441,7 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf,
#define PRINT_HT_CAP(_cond, _str) \
do { \
if (_cond) \
p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \
p += scnprintf(p, bufsz + buf - p, "\t" _str "\n"); \
} while (0)
char *buf, *p;
int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment