From: Dan Carpenter Date: Sat, 10 Jul 2010 22:10:42 +0000 (+0200) Subject: hostap: fixup strlen() math X-Git-Tag: v2.6.36-rc1~571^2~107^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b967e41e0f75328150b7cddf79de4ee57616f01;p=pandora-kernel.git hostap: fixup strlen() math In hostap_add_interface() we do: sprintf(dev->name, "%s%s", prefix, name); dev->name has IFNAMSIZ (16) characters. prefix is local->dev->name. name is "wds%d" strlen() returns the number of characters in the string not counting the NULL so if we have a string with 11 characters we get "12345678901wds%d" which is 16 characters and a NULL so we're past the end of the array. Signed-off-by: Dan Carpenter Signed-off-by: John W. Linville --- Reading git-diff-tree failed