wlan: Avoid buffer overflow.

scnprintf returns the number of characters
which are actually written in the buffer.
Currently there is no check, while filling
buffer. Hence a situation might arise where
the len is greater than the sizeof of buffer.

Latter on this buffer is copied to user space
through api copy_to_user and since the len
is greater than buffer size, buffer over-flow
would occur. As a part of fix, make sure that
buffer over doesn't occur.

Change-Id: I652979cb26fd7fff36ee54f9ec60132453ac7913
CRs-Fixed: 908252
1 file changed
tree: 1a86a31aa3872d75be92b66f3ddd279277afd0a8
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile