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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;