staging: r8188eu: get a string from the user correctly
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 31 Oct 2014 10:40:39 +0000 (13:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Nov 2014 00:22:50 +0000 (16:22 -0800)
commitd0915b2255bfbdd537fd6a52f9a0a7037ecbe2d5
treea4e727a9f138f72a94f18d3a513cf9e5c824a183
parentf8e4df53c785a3c19650e57b5c514a4b50d82078
staging: r8188eu: get a string from the user correctly

The original code had two bugs:
1) It didn't check if the string was zero length so it could oops when
   it tried to dereference the ZERO_SIZE_PTR.
2) It didn't enforce that the string was NUL terminated.

It was also messy as pants.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/rtw_android.c