Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c92831d authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville
Browse files

prism54: call BUG_ON() earlier



This test is off by one because strlen() doesn't include the NULL
terminator.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 72e93e91
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2067,7 +2067,7 @@ send_simple_event(islpci_private *priv, const char *str)
	memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
	if (!memptr)
		return;
	BUG_ON(n > IW_CUSTOM_MAX);
	BUG_ON(n >= IW_CUSTOM_MAX);
	wrqu.data.pointer = memptr;
	wrqu.data.length = n;
	strcpy(memptr, str);