staging: tidspbridge/pmgr: additional checking after return from strlen_user
authorChen Gang <gang.chen@asianux.com>
Mon, 21 Jan 2013 09:33:26 +0000 (17:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jan 2013 22:00:10 +0000 (14:00 -0800)
commitec7e0aef31e2eece787f7c49df1f031f2a983265
tree45b7fa8dc599aabe277d656d86d3957e7c445ef1
parentcdbbc618f8f483d72e82af05f2873621cc9c2314
staging: tidspbridge/pmgr: additional checking after return from strlen_user

  strlen_user will return the length including final NUL.
    and will return 0 if failed (for example: if user string not NUL terminated)

  so need check whether it is an invalid parameter.

addtional info:
  can reference the comments of strlen_user in lib/strnlen_user.c

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/tidspbridge/pmgr/dspapi.c