]> git.michaelhowe.org Git - packages/o/openafs.git/commit
kauth: Don't overflow stack when building username
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 09:35:01 +0000 (09:35 +0000)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 3 Jun 2014 16:50:27 +0000 (12:50 -0400)
commit5ad98f49dfb52b9f20375a9163ec17dd184523b3
treec7a50c1167d4aa18cc047947fcffa9b3684cd422
parentcb1c5ddb307db2d4f7a9e3e9627b8576fc1aa9e5
kauth: Don't overflow stack when building username

knfs constructs the userName by combining the clientName.name
and clientName.instance arrays, along with a dot separator. Make
sure that the userName array is big enough to hold these, and
use strlcpy and strlcat just to make sure.

Caught by coverity (#985829)

Reviewed-on: http://gerrit.openafs.org/9351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit cc194827a841f057654f1dbe4dcb3f6de98c1c60)

Change-Id: Iec62a0e0fb830e8bfc76896733269d0511c5a8d9
Reviewed-on: http://gerrit.openafs.org/11055
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/kauth/knfs.c