rmtsys: Don't overflow pathname buffer
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 10:15:10 +0000 (10:15 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 7 Mar 2013 15:54:31 +0000 (07:54 -0800)
commitf322b0ff1ec44d713c23d567f4d304e3dc65e702
tree63695fac09881910b3c8006859e4c43dd742c42a
parentb32d92268f77608b57adf350d963941a94a31604
rmtsys: Don't overflow pathname buffer

When we're constructing a homedirectory path to look for the
.AFSSERVER file in, we copy the HOME environment variable into a
static buffer, with a risk of overflowing that buffer.

Instead of using a static buffer, just allocate one with asprintf.

Caught by coverity (#985910)

Change-Id: I2daa5613609f2c09712b12a7ce7e59b1c0028ef2
Reviewed-on: http://gerrit.openafs.org/9392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/sys/rmtsysc.c